switch (bo) {
case BT_CTF_BYTE_ORDER_UNKNOWN:
return "BT_CTF_BYTE_ORDER_UNKNOWN";
- case BT_CTF_BYTE_ORDER_NONE:
- return "BT_CTF_BYTE_ORDER_NONE";
+ case BT_CTF_BYTE_ORDER_UNSPECIFIED:
+ return "BT_CTF_BYTE_ORDER_UNSPECIFIED";
case BT_CTF_BYTE_ORDER_NATIVE:
return "BT_CTF_BYTE_ORDER_NATIVE";
case BT_CTF_BYTE_ORDER_LITTLE_ENDIAN:
BT_CTF_BYTE_ORDER_NATIVE = 0,
/**
- No byte order; the initial native byte order of a
+ Unspecified byte order; the initial native byte order of a
\link ctfirtraceclass CTF IR trace class\endlink.
*/
- BT_CTF_BYTE_ORDER_NONE,
+ BT_CTF_BYTE_ORDER_UNSPECIFIED,
/// Little-endian.
BT_CTF_BYTE_ORDER_LITTLE_ENDIAN,
with bt_ctf_trace_set_name().
- <strong>UUID</strong>: none. You can set a UUID with
bt_ctf_trace_set_uuid().
-- <strong>Native byte order</strong>: #BT_CTF_BYTE_ORDER_NONE. You
- can set a native byte order with bt_ctf_trace_set_native_byte_order().
+- <strong>Native byte order</strong>: #BT_CTF_BYTE_ORDER_UNSPECIFIED.
+ You can set a native byte order with
+ bt_ctf_trace_set_native_byte_order().
- <strong>Environment</strong>: empty. You can add environment entries
with bt_ctf_trace_set_environment_field(),
bt_ctf_trace_set_environment_field_integer(), and
- #BT_CTF_BYTE_ORDER_BIG_ENDIAN
- #BT_CTF_BYTE_ORDER_NETWORK
- <strong>If the trace is not in CTF writer mode<strong>,
- #BT_CTF_BYTE_ORDER_NONE.
+ #BT_CTF_BYTE_ORDER_UNSPECIFIED.
@param[in] trace_class Trace class of which to set the native byte
order.
@prenotnull{trace_class}
@prehot{trace_class}
-@pre \p native_byte_order is either #BT_CTF_BYTE_ORDER_NONE (if the
+@pre \p native_byte_order is either #BT_CTF_BYTE_ORDER_UNSPECIFIED (if the
trace is not in CTF writer mode),
#BT_CTF_BYTE_ORDER_LITTLE_ENDIAN, #BT_CTF_BYTE_ORDER_BIG_ENDIAN, or
#BT_CTF_BYTE_ORDER_NETWORK.
}
BT_LOGD_STR("Creating trace object.");
- trace->native_byte_order = BT_CTF_BYTE_ORDER_NONE;
+ trace->native_byte_order = BT_CTF_BYTE_ORDER_UNSPECIFIED;
bt_object_init(trace, bt_ctf_trace_destroy);
trace->clocks = g_ptr_array_new_with_free_func(
(GDestroyNotify) bt_put);
int ret = 0;
if (trace->native_byte_order == BT_CTF_BYTE_ORDER_NATIVE ||
- trace->native_byte_order == BT_CTF_BYTE_ORDER_NONE) {
- BT_LOGW("Invalid parameter: trace's byte order cannot be BT_CTF_BYTE_ORDER_NATIVE or BT_CTF_BYTE_ORDER_NONE at this point; "
+ trace->native_byte_order == BT_CTF_BYTE_ORDER_UNSPECIFIED) {
+ BT_LOGW("Invalid parameter: trace's byte order cannot be BT_CTF_BYTE_ORDER_NATIVE or BT_CTF_BYTE_ORDER_UNSPECIFIED at this point; "
"set it with bt_ctf_trace_set_native_byte_order(): "
"addr=%p, name=\"%s\"",
trace, bt_ctf_trace_get_name(trace));
}
if (trace->is_created_by_writer &&
- byte_order == BT_CTF_BYTE_ORDER_NONE) {
- BT_LOGW("Invalid parameter: BT_CTF_BYTE_ORDER_NONE byte order is not allowed for a CTF writer trace: "
+ byte_order == BT_CTF_BYTE_ORDER_UNSPECIFIED) {
+ BT_LOGW("Invalid parameter: BT_CTF_BYTE_ORDER_UNSPECIFIED byte order is not allowed for a CTF writer trace: "
"addr=%p, name=\"%s\"",
trace, bt_ctf_trace_get_name(trace));
ret = -1;
* the CTF writer object chooses, which is the machine's native
* byte order.
*/
- if (order != BT_CTF_BYTE_ORDER_NONE) {
+ if (order != BT_CTF_BYTE_ORDER_UNSPECIFIED) {
ret = bt_ctf_trace_set_native_byte_order(writer_trace, order);
if (ret) {
fprintf(err, "[error] %s in %s:%d\n", __func__, __FILE__, __LINE__);
trace = bt_ctf_writer_get_trace(writer);
ok(bt_ctf_trace_set_native_byte_order(trace, BT_CTF_BYTE_ORDER_NATIVE),
"Cannot set a trace's byte order to BT_CTF_BYTE_ORDER_NATIVE");
- ok(bt_ctf_trace_set_native_byte_order(trace, BT_CTF_BYTE_ORDER_NONE),
- "Cannot set a trace's byte order to BT_CTF_BYTE_ORDER_NONE");
+ ok(bt_ctf_trace_set_native_byte_order(trace, BT_CTF_BYTE_ORDER_UNSPECIFIED),
+ "Cannot set a trace's byte order to BT_CTF_BYTE_ORDER_UNSPECIFIED");
ok(trace,
"bt_ctf_writer_get_trace returns a bt_ctf_trace object");
ok(bt_ctf_trace_set_native_byte_order(trace, BT_CTF_BYTE_ORDER_BIG_ENDIAN) == 0,