Modem
Represents a Modem device. Inherits data and feed operations from Asset and device operations from Device.
- class roak_sdk.semantics.devices.modem.Modem(data, registry)[source]
Bases:
DeviceRepresents a Modem device in the ROAK system. Inherits from the base Device class.
- Parameters:
data (dict)
registry (ClientRegistry)
- DEFAULT_FEEDS: list[str] = ['diverPressure', 'diverTemperature', 'baroPressure', 'baroTemperature']
- get_data_through_children(feeds=None, start_datetime=None, end_datetime=None)[source]
Fetch data for this device by aggregating data from child devices.
- Parameters:
- Returns:
Mapping of child device name to its data.
- Return type:
- get_attributes()
Get the locally cached attribute dictionary.
- Returns:
Raw data dictionary.
- Return type:
- get_children()
Fetch child devices of this device.
- Returns:
List of child Device instances.
- Return type:
list[Device]
- get_data(start_datetime=None, end_datetime=None, feeds=None)
First check if requested feeds exist. Fetch data for this asset within a date range.
- Parameters:
- Returns:
List of data records.
- Return type:
- Raises:
AssetValidationError – If provided datetimes are naive or invalid.
- get_feeds()
Fetch available data feeds for this asset.
- get_last_values()
Get one last-reading summary row per feed for this semantic.
- Returns rows with:
feedname
last_value
unit (unit.name)
record_time
- refresh_attributes()
Fetch semantic attributes for this semantic and merge into
_data.Expects the API payload shape to be paged, with the attribute list in
payload["content"].