Constructor
new Trace(traceId, maxItemId, maxEntrySize, multiOpen, buffer)
Parameters:
Name | Type | Description |
---|---|---|
traceId |
number | |
maxItemId |
number | |
maxEntrySize |
number | |
multiOpen |
boolean | |
buffer |
Flx.Buffer |
Extends
- Flx.TraceItem
Methods
addHead(name, description) → {number}
Writes a head entry. The head entry contains information data about the trace and is also used as file identification.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | : The name of the item |
description |
string | : Descriptive text for this item or 0 |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
addHeadDerived(format4, name, description) → {number}
Writes a head entry for a derived format. The head entry contains information data about the trace and is also used as file identification.
Parameters:
Name | Type | Description |
---|---|---|
format4 |
string | : Format identification (4 characters) |
name |
string | : The name of the item |
description |
string | : Descriptive text for this item or 0 |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
addModeHead(name, description, mode) → {number}
Writes a head entry. The head entry contains information data about the trace and is also used as file identification.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | : The name of the item |
description |
string | : Descriptive text for this item or 0 |
mode |
number | : Mode parameter 0:normal 1: sync |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
addScatteredSignal(itemId, parentId, name, description, signalType, signalDescriptor, scatteredFrom, scatteredTo) → {number}
Writes an item entry for scattered signals.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id for this new item. The id must be unique for this trace and in the range of 1..maxItemId |
parentId |
number | : Defines the parent of this new item (or 0 for the root item) |
name |
string | : The name of the item |
description |
string | : Descriptive text for this item or 0 |
signalType |
number | : The type of this new signal (Flx.TYPE_...) |
signalDescriptor |
string | : Extended definition of the signal type, usually set to 0 for default |
scatteredFrom |
number | : Scattered from (e.g. bit position 0) |
scatteredTo |
number | : Scattered to (e.g. bit position 4) |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
addScatteredSignalReference(referenceId, parentId, name, description, scatteredFrom, scatteredTo) → {number}
Writes an item entry for a scattered signal reference.
Parameters:
Name | Type | Description |
---|---|---|
referenceId |
number | |
parentId |
number | : Defines the parent of this new item (or 0 for the root item) |
name |
string | : The name of the item |
description |
string | : Descriptive text for this item or 0 |
scatteredFrom |
number | : Scattered from (e.g. bit position 0) |
scatteredTo |
number | : Scattered to (e.g. bit position 4) |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
addScope(itemId, parentId, name, description) → {number}
Writes an item entry for a scope.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id for this new item. The id must be unique for this trace and in the range of 1..maxItemId |
parentId |
number | : Defines the parent of this new item (or 0 for the root item) |
name |
string | : The name of the item |
description |
string | : Descriptive text for this item or 0 |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
addSignal(itemId, parentId, name, description, signalType, signalDescriptor) → {number}
Writes a signal item entry.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id for this new item. The id must be unique for this trace and in the range of 1..maxItemId |
parentId |
number | : Defines the parent of this new item (or 0 for the root item) : Defines the parent of this new item (or 0 for the root item) |
name |
string | : The name of the item |
description |
string | : Descriptive text for this item or 0 |
signalType |
number | : The type of this new signal (Flx.TYPE_...) |
signalDescriptor |
string | : Extended definition of the signal type, usually set to 0 for default |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
addSignalReference(referenceId, parentId, name, description) → {number}
Writes an item entry for a signal reference.
Parameters:
Name | Type | Description |
---|---|---|
referenceId |
number | |
parentId |
number | : Defines the parent of this new item (or 0 for the root item) |
name |
string | : The name of the item |
description |
string | : Descriptive text for this item or 0 |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
addSignals(itemIdFrom, itemIdTo, parentId, name, description, signalType, signalDescriptor) → {number}
Writes an item entry for multiple signals.
Parameters:
Name | Type | Description |
---|---|---|
itemIdFrom |
number | : The first item id for this new item set. The id must be unique for this trace and in the range of 1..maxItemId |
itemIdTo |
number | : The last item id for this new item set. The id must be unique for this trace and in the range of 1..maxItemId |
parentId |
number | : Defines the parent of this new item (or 0 for the root item) |
name |
string | : The name of the item |
description |
string | : Descriptive text for this item or 0 |
signalType |
number | : The type of this new signal (Flx.TYPE_...) |
signalDescriptor |
string | : Extended definition of the signal type, usually set to 0 for default |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
close(itemId, end) → {number}
Closes a sequence. This closes the sequence for the references item and all items below (children,...).
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item to be opened (1..maxItemId or 0 for the root item) |
end |
number | : Domain position as a multiple of its domain base (e.g. domain base=1ms , units = 100, -> domain value = 100ms). |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
getCurrent(itemId) → {number}
Returns the currentdomain position.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item to be opened (1..maxItemId or 0 for the root item) |
Returns:
Returns the current domain position, or 0 if not open
- Type
- number
isOpen(itemId) → {boolean}
Checks the open state of an item.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item to be opened (1..maxItemId or 0 for the root item) |
Returns:
Returns true if a sequence has been opened for the given item.
- Type
- boolean
isScope(itemId) → {boolean}
Tests the item type.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId |
Returns:
Returns true if the item is a scope
- Type
- boolean
isSignal(itemId) → {boolean}
Tests the item type.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId |
Returns:
Returns true if the item is a signal
- Type
- boolean
open(itemId, domainBase, start, rate) → {number}
Opens a new sequence. This opens the sequence for the references item and all items below (children,...).
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item to be opened (1..maxItemId or 0 for the root item) |
domainBase |
string | : Domain base (e.g. ns, us, Hz,..), or 0 for default. |
start |
number | : Domain position as a multiple of its domain base (e.g. domain base=1ms, units = 100, -> domain value = 100ms) |
rate |
number | : Domain rate as a multiple of its domain base |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
setDefaultOpenDomain(domainBase) → {number}
Sets the default domain. This is used when using the flxOpen with domain=0
Parameters:
Name | Type | Description |
---|---|---|
domainBase |
string | : Domain base (e.g. ns, us, Hz,..), or 0 for default. |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
writeArrayDef(itemId, index, label, memberDescriptor) → {number}
Writes an entry for an array definition.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId |
index |
number | : Index of the array member (0..size-1). |
label |
string | : Label of the array member. |
memberDescriptor |
string | : Type descriptor or 0 for default. |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
writeBinaryAt(itemId, conflict, domainPosition, isDelta, value, tag) → {number}
Writes a binary sample.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId |
conflict |
: Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red | |
domainPosition |
number | : Domain position as a multiple of its domain base (e.g. domain base=1ms; units = 100; -> domain value = 100ms). |
isDelta |
boolean | : If set to true, domain will be taken as positive relative value (0 to keep the domain position) |
value |
Array.<byte> | : The value |
tag |
number |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
writeCurrent(itemId, domainPosition) → {number}
Sets the current domain position.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId |
domainPosition |
number | : Domain position as a multiple of its domain base (e.g. domain base=1ms; units = 100; -> domain value = 100ms). |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
writeEnumDef(itemId, enumeration, label, value) → {number}
Writes an entry for a enumeration.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId |
enumeration |
number | : Define the enumeration domain (e.g. Flx.ENUM_GLOBAL, Flx.ENUM_MEMBER_0, ..) |
label |
string | : The textual representation of the enum. |
value |
number | : The value : The integer value of the enum. This value must be unique for one enumeration domain. |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
writeEventArrayAt(itemId, conflict, domainPosition, isDelta, value, dynamicSize, tag) → {number}
Writes an event array sample.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId |
conflict |
: Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red | |
domainPosition |
number | : Domain position as a multiple of its domain base (e.g. domain base=1ms; units = 100; -> domain value = 100ms). |
isDelta |
boolean | : If set to true, domain will be taken as positive relative value (0 to keep the domain position) |
value |
Array.<int> | : The value |
dynamicSize |
boolean | : Set to true, if the size of the array is volatile. |
tag |
number |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
writeEventAt(itemId, conflict, domainPosition, isDelta, value, tag) → {number}
Writes an event sample.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId |
conflict |
: Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red | |
domainPosition |
number | : Domain position as a multiple of its domain base (e.g. domain base=1ms; units = 100; -> domain value = 100ms). |
isDelta |
boolean | : If set to true, domain will be taken as positive relative value (0 to keep the domain position) |
value |
number | : The value |
tag |
number |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
writeFloatArrayAt(itemId, conflict, domainPosition, isDelta, value, dynamicSize, tag) → {number}
Writes a float array sample.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId |
conflict |
: Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red | |
domainPosition |
number | : Domain position as a multiple of its domain base (e.g. domain base=1ms; units = 100; -> domain value = 100ms). |
isDelta |
boolean | : If set to true, domain will be taken as positive relative value (0 to keep the domain position) |
value |
* | : The value |
dynamicSize |
boolean | : Set to true, if the size of the array is volatile. |
tag |
number |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
writeFloatAt(itemId, domainPosition, current, isDelta, value, tag) → {number}
Writes a float sample.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId |
domainPosition |
number | : Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red |
current |
: Domain position as a multiple of its domain base (e.g. domain base=1ms; units = 100; -> domain value = 100ms). | |
isDelta |
boolean | : If set to true, domain will be taken as positive relative value (0 to keep the domain position) |
value |
number | : The value |
tag |
number |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
writeIntArrayAt(itemId, conflict, domainPosition, isDelta, value, dynamicSize, tag) → {number}
Writes an integer array sample.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId |
conflict |
: Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red | |
domainPosition |
number | : Domain position as a multiple of its domain base (e.g. domain base=1ms; units = 100; -> domain value = 100ms). |
isDelta |
boolean | : If set to true, domain will be taken as positive relative value (0 to keep the domain position) |
value |
* | : The value |
dynamicSize |
boolean | : Set to true, if the size of the array is volatile. |
tag |
number |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
writeIntAt(itemId, conflict, domainPosition, isDelta, value, tag) → {number}
Writes an integer sample.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId |
conflict |
: Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red | |
domainPosition |
number | : Domain position as a multiple of its domain base (e.g. domain base=1ms; units = 100; -> domain value = 100ms). |
isDelta |
boolean | : If set to true, domain will be taken as positive relative value (0 to keep the domain position) |
value |
number | : The value |
tag |
number |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
writeLabel(itemId, style) → {number}
Writes a label entry. The label is added to the previously written sample.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId |
style |
number | : Enumeration id of the style description. |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
writeLogicStatesAt(itemId, conflict, domainPosition, isDelta, precedingStates, value, totalBitWidth, tag) → {number}
Writes a logic sample using an array of states.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId |
conflict |
: Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red | |
domainPosition |
number | : Domain position as a multiple of its domain base (e.g. domain base=1ms; units = 100; -> domain value = 100ms). |
isDelta |
boolean | : If set to true, domain will be taken as positive relative value (0 to keep the domain position) |
precedingStates |
number | : If the given no of bits less than the defined one, the preceding states will be filled to the left |
value |
Array.<byte> | : The value |
totalBitWidth |
number | : Total size if the logic vector |
tag |
number |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
writeLogicTextAt(trace, itemId, conflict, domainPosition, isDelta, precedingStates, value, totalBitWidth, tag) → {number}
Writes a logic sample using a text.
Parameters:
Name | Type | Description |
---|---|---|
trace |
: The trace object | |
itemId |
number | : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId |
conflict |
: Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red | |
domainPosition |
number | : Domain position as a multiple of its domain base (e.g. domain base=1ms; units = 100; -> domain value = 100ms). |
isDelta |
boolean | : If set to true, domain will be taken as positive relative value (0 to keep the domain position) |
precedingStates |
number | : If the given no of bits less than the defined one, the preceding states will be filled to the left |
value |
string | : The value |
totalBitWidth |
number | : Total size if the logic vector |
tag |
number |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
writeMemberDef(itemId, memberId, parentId, label, memberType, memberDescriptor) → {number}
Writes an entry for a member definition.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId |
memberId |
number | : Id of the member (0..N). This id need to be unique for one signal item. |
parentId |
number | : Id of the parent member (0..N) or -1 if no parent member. Only for sub structures. |
label |
string | : Label of the struct member. |
memberType |
number | : Data type of this member (Flx.STRUCTTYPE_TEXT, Flx.STRUCTTYPE_ENUM,...) |
memberDescriptor |
string | : Type descriptor or 0 for default. |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
writeMemberDefs(itemId, member, members) → {number}
Writes multiple entries for member definition.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId |
member |
: Member structure of type flxMemberValue | |
members |
Array.<de.toem.flux.Flx.MemberValue> |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
writeMembersAt(itemId, conflict, domainPosition, isDelta, value, tag) → {number}
Writes a struct sample.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId |
conflict |
: Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red | |
domainPosition |
number | : Domain position as a multiple of its domain base (e.g. domain base=1ms; units = 100; -> domain value = 100ms). |
isDelta |
boolean | : If set to true, domain will be taken as positive relative value (0 to keep the domain position) |
value |
Array.<de.toem.flux.Flx.MemberValue> | : The value |
tag |
number |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
writeNoneAt(itemId, conflict, domainPosition, isDelta, tag) → {number}
Writes a 'none' samples.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId |
conflict |
: Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red | |
domainPosition |
number | : Domain position as a multiple of its domain base (e.g. domain base=1ms; units = 100; -> domain value = 100ms). |
isDelta |
boolean | : If set to true, domain will be taken as positive relative value (0 to keep the domain position) |
tag |
number |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
writeRelation(itemId, type, target, style, deltaOrPosition, targetBase, ldeltaOrPosition) → {number}
Writes an relation entry. An relation connects the previously written sample with any other item (path of the item) at a relative position.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId |
type |
number | : Relation type. |
target |
number | : Path to the target signal (e.g. "\\scope\\signal") |
style |
number | : Enumeration id of the style description. |
deltaOrPosition |
: Delta position | |
targetBase |
number | : Target domain base |
ldeltaOrPosition |
number |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
writeTextArrayAt(itemId, conflict, domainPosition, isDelta, value, dynamicSize, tag) → {number}
Writes an text array sample.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId |
conflict |
: Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red | |
domainPosition |
number | : Domain position as a multiple of its domain base (e.g. domain base=1ms; units = 100; -> domain value = 100ms). |
isDelta |
boolean | : If set to true, domain will be taken as positive relative value (0 to keep the domain position) |
value |
Array.<java.lang.String> | : The value |
dynamicSize |
boolean | : Set to true, if the size of the array is volatile. |
tag |
number |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number
writeTextAt(itemId, conflict, domainPosition, isDelta, value, size, tag) → {number}
Writes a text sample.
Parameters:
Name | Type | Description |
---|---|---|
itemId |
number | : The item id of the referenced item. The id must be unique for this trace and in the range of 1..maxItemId |
conflict |
: Marks the new sample as a 'conflict' one. In impulse conflict samples are painted in red | |
domainPosition |
number | : Domain position as a multiple of its domain base (e.g. domain base=1ms; units = 100; -> domain value = 100ms). |
isDelta |
boolean | : If set to true, domain will be taken as positive relative value (0 to keep the domain position) |
value |
string | : The value |
size |
: Size of the value in characters | |
tag |
number |
Returns:
Returns Flx.OK is succeeded, or Flx.ERROR_ in the error case
- Type
- number