Signals - Access object to signal definitions¶
Provides access API to signal definition resources. A signal definition is a conversion definition for converting binary data into physical values when retrieving data from the server. You can convert the time series data to physical values on the server side by specifying the appropriate signal definition.
Request Methods¶
Warning
Be sure to create the access object using signals on client.
client = intdash.Client(...)
client.signals.list()
- class Signals(...)[source]¶
Access object to the signal definition resources.
- create(label, data_type, data_id, channel, conversion, display, description='')[source]¶
Creates a signal definition in the server.
- Parameters
label (str) – Label name
data_type (DataType) – Data type
data_id (str) – Data ID
channel (int) – Channel
conversion (Conversion) – Conversion definition
display (Display) – Display definition
description (str) – Explanation
- delete(uuid)[source]¶
Deletes the signal definition from the server.
- Parameters
uuid (str) – UUID of the signal definition to be deleted
- get(uuid)[source]¶
Retrieves a signal definition.
- Parameters
uuid (str) – UUID of the signal definition to be retrieved
- Returns
Signal definition object
- Return type
- list(label=None, sort='label', order='asc', limit=100, page=1, iterator=False)[source]¶
Retrieves a list of signal definitions.
- Parameters
label (str) – Label name
sort (str) – Field name used for sorting
order (str) – Sort order (
asc
ordesc
)limit (int) – Maximum number of items retrieved
page (int) – Page number
iterator (bool) – If True, generate an iterator.
- Returns
List of signal definition objects
- Return type
list[Signal]
- update(uuid, label=None, description=None, data_type=None, data_id=None, channel=None, conversion=None, display=None)[source]¶
Updates the signal definition.
- Parameters
uuid (str) – UUID of the signal definition to be updated
label (str) – Label name
description (str) – Explanation
data_type (DataType) – Data type
data_id (str) – Data ID
channel (int) – Channel
conversion (Conversion) – Conversion definition
display (Display) – Display definition
Request Params¶
- class ConversionType(...)[source]¶
A constant that represents the conversion type.
- csv = 'csv'¶
- json = 'json'¶
- none = 'none'¶
- num_fixed_point = 'num_fixed_point'¶
- num_floating_point = 'num_floating_point'¶
- sub_bytes = 'sub_bytes'¶
- sub_string = 'sub_string'¶
- class Conversion(...)[source]¶
Base class for conversion definitions.
- type¶
Conversion definition type
- Type
- options¶
Conversion definition details
- Type
dict
- class ConversionNone(...)[source]¶
Conversion definition to use if no conversion is to be performed.
- class ConversionJSON(...)[source]¶
An object that defines a conversion from JSON.
- fieldpath¶
Field path
- Type
str
- value_type¶
Output value type (
str
ornum
)- Type
str
- class ConversionCSV(...)[source]¶
Object that defines conversion from CSV.
- delimiters¶
List of delimiters
- Type
list[str]
- index¶
Index
- Type
int
- value_type¶
Output value type (
str
ornum
)- Type
str
- class ConversionNumFixedPoint(...)[source]¶
Conversion definition object that represents reading as a fixed point number.
- startbit¶
Start bit position
- Type
int
- bitsize¶
Bit size
- Type
int
- endian¶
Endian (
little
orbig
)- Type
str
- sign¶
Signed (
signed
orunsigned
)- Type
str
- scale¶
Scale factor
- Type
float
- offset¶
Offset
- Type
float
- class ConversionNumFloatingPoint(...)[source]¶
Conversion definition object that represents reading as a floating point number.
- startbyte¶
Starting byte position
- Type
int
- endian¶
Endian (
little
orbig
)- Type
str
- precision¶
Precision (
64
or32
)- Type
int
- class ConversionSubBytes(...)[source]¶
Conversion definition object that represents cutting out of a byte string.
- startbyte¶
Starting byte position
- Type
int
- bytesize¶
Byte size
- Type
int
Response¶
- class Signal(...)[source]¶
An object that represents a signal definition resource.
- uuid¶
UUID
- Type
str
- label¶
Label name
- Type
str
- description¶
Explanation
- Type
str
- data_id¶
Data ID
- Type
str
- channel¶
Channel number
- Type
int
- conversion¶
Conversion definition
- Type
- hash¶
Signal definition hash
- Type
str
- created_at¶
Created time
- Type
pandas.Timestamp
- updated_at¶
Updated time
- Type
pandas.Timestamp