dsm-api-v2
|
This group of API calls addresses functions and properties of the whole circuit attached to the dSM. More...
Typedefs | |
typedef void(* | CircuitCurrentMeterValue_get_request_callback_t )(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId) |
Return the current active and reactive power metering values. | |
typedef void(* | CircuitCurrentMeterValue_get_response_callback_t )(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId, uint16_t PowerW, uint16_t PowerQ, uint16_t Phi) |
Return the current active and reactive power metering values. | |
typedef void(* | CircuitEnergyMeterValue_calibration_request_callback_t )(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId) |
Read the values necessary for metering calibration. | |
typedef void(* | CircuitEnergyMeterValue_calibration_response_callback_t )(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId, uint16_t Uaverage, uint16_t I14average, uint16_t I180average, uint32_t PActiveLow, uint32_t PActiveHigh) |
Read the values necessary for metering calibration. | |
typedef void(* | CircuitEnergyMeterValue_get_request_callback_t )(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId) |
Return the current energy and power metering values. | |
typedef void(* | CircuitEnergyMeterValue_get_response_callback_t )(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId, uint32_t PowerW, uint32_t EnergyWh) |
Return the current energy and power metering values. | |
typedef void(* | CircuitEnergyMeterValue_reset_request_callback_t )(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId) |
Return the current energy and power metering values. | |
typedef void(* | CircuitEnergyMeterValue_reset_response_callback_t )(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId, uint32_t PowerW, uint32_t EnergyWh) |
Return the current energy and power metering values. | |
typedef void(* | CircuitEnergyMeterValue_Ws_get_request_callback_t )(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId) |
Return the current energy and power metering values. | |
typedef void(* | CircuitEnergyMeterValue_Ws_get_response_callback_t )(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId, uint32_t PowerW, uint32_t EnergyWs) |
Return the current energy and power metering values. | |
typedef void(* | CircuitPingDevices_automatic_request_callback_t )(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId, uint16_t IntervalTime) |
Dynamically change the behavior of the pinging of devices. | |
typedef void(* | CircuitPingDevices_automatic_response_callback_t )(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId) |
Dynamically change the behavior of the pinging of devices. | |
typedef void(* | CircuitPingDevices_off_request_callback_t )(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId) |
Dynamically change the behavior of the pinging of devices. | |
typedef void(* | CircuitPingDevices_off_response_callback_t )(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId) |
Dynamically change the behavior of the pinging of devices. | |
typedef void(* | CircuitPingDevices_one_time_automatic_request_callback_t )(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId, uint16_t OneTimeIntervalTime, uint16_t AutoIntervalTime) |
Dynamically change the behavior of the pinging of devices. | |
typedef void(* | CircuitPingDevices_one_time_automatic_response_callback_t )(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId) |
Dynamically change the behavior of the pinging of devices. | |
typedef void(* | CircuitPingDevices_one_time_off_request_callback_t )(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId, uint16_t IntervalTime) |
Dynamically change the behavior of the pinging of devices. | |
typedef void(* | CircuitPingDevices_one_time_off_response_callback_t )(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId) |
Dynamically change the behavior of the pinging of devices. | |
Functions | |
int | CircuitCurrentMeterValue_get (DsmApiHandle_t handle, dsid_t dSMdSID, uint16_t *PowerW, uint16_t *PowerQ, uint16_t *Phi) |
Return the current active and reactive power metering values. | |
int | CircuitEnergyMeterValue_calibration (DsmApiHandle_t handle, dsid_t dSMdSID, uint16_t *Uaverage, uint16_t *I14average, uint16_t *I180average, uint32_t *PActiveLow, uint32_t *PActiveHigh) |
Read the values necessary for metering calibration. | |
int | CircuitEnergyMeterValue_get (DsmApiHandle_t handle, dsid_t dSMdSID, uint32_t *PowerW, uint32_t *EnergyWh) |
Return the current energy and power metering values. | |
int | CircuitEnergyMeterValue_reset (DsmApiHandle_t handle, dsid_t dSMdSID, uint32_t *PowerW, uint32_t *EnergyWh) |
Return the current energy and power metering values. | |
int | CircuitEnergyMeterValue_Ws_get (DsmApiHandle_t handle, dsid_t dSMdSID, uint32_t *PowerW, uint32_t *EnergyWs) |
Return the current energy and power metering values. | |
int | CircuitPingDevices_automatic (DsmApiHandle_t handle, dsid_t dSMdSID, uint16_t IntervalTime) |
Dynamically change the behavior of the pinging of devices. | |
int | CircuitPingDevices_off (DsmApiHandle_t handle, dsid_t dSMdSID) |
Dynamically change the behavior of the pinging of devices. | |
int | CircuitPingDevices_one_time_automatic (DsmApiHandle_t handle, dsid_t dSMdSID, uint16_t OneTimeIntervalTime, uint16_t AutoIntervalTime) |
Dynamically change the behavior of the pinging of devices. | |
int | CircuitPingDevices_one_time_off (DsmApiHandle_t handle, dsid_t dSMdSID, uint16_t IntervalTime) |
Dynamically change the behavior of the pinging of devices. |
This group of API calls addresses functions and properties of the whole circuit attached to the dSM.
typedef void(* CircuitCurrentMeterValue_get_request_callback_t)(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId) |
Return the current active and reactive power metering values.
Also calculated phase.
Request callback function prototype for call CircuitCurrentMeterValue_get.
To register this callback function, call the DsmApiSetCallback function with MessageType = DS485_CONTAINER_REQUEST, MessageId = CIRCUIT_CURRENT_METER_VALUE and ModifierId = CIRCUIT_CURRENT_METER_VALUE_GET
[in] | error | Error result of the (potential) previous call. |
[in] | arg | User data |
[in] | sourceId | Source address of the call |
[in] | destinationId | Destination address of the call |
typedef void(* CircuitCurrentMeterValue_get_response_callback_t)(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId, uint16_t PowerW, uint16_t PowerQ, uint16_t Phi) |
Return the current active and reactive power metering values.
Also calculated phase.
Response callback function prototype for call CircuitCurrentMeterValue_get.
To register this callback function, call the DsmApiSetCallback function with MessageType = DS485_CONTAINER_RESPONSE, MessageId = CIRCUIT_CURRENT_METER_VALUE and ModifierId = CIRCUIT_CURRENT_METER_VALUE_GET
[in] | error | Error result of the (potential) previous call. |
[in] | arg | User data |
[in] | sourceId | Source address of the call |
[in] | destinationId | Destination address of the call |
[in] | PowerW | Current active power [W]. |
[in] | PowerQ | Current reactive power [var]. |
[in] | Phi | Phase [rad] (multiplied with 2^14). |
typedef void(* CircuitEnergyMeterValue_calibration_request_callback_t)(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId) |
Read the values necessary for metering calibration.
Request callback function prototype for call CircuitEnergyMeterValue_calibration.
To register this callback function, call the DsmApiSetCallback function with MessageType = DS485_CONTAINER_REQUEST, MessageId = CIRCUIT_ENERGY_METER_VALUE and ModifierId = CIRCUIT_ENERGY_METER_VALUE_CALIBRATION
[in] | error | Error result of the (potential) previous call. |
[in] | arg | User data |
[in] | sourceId | Source address of the call |
[in] | destinationId | Destination address of the call |
typedef void(* CircuitEnergyMeterValue_calibration_response_callback_t)(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId, uint16_t Uaverage, uint16_t I14average, uint16_t I180average, uint32_t PActiveLow, uint32_t PActiveHigh) |
Read the values necessary for metering calibration.
Response callback function prototype for call CircuitEnergyMeterValue_calibration.
To register this callback function, call the DsmApiSetCallback function with MessageType = DS485_CONTAINER_RESPONSE, MessageId = CIRCUIT_ENERGY_METER_VALUE and ModifierId = CIRCUIT_ENERGY_METER_VALUE_CALIBRATION
[in] | error | Error result of the (potential) previous call. |
[in] | arg | User data |
[in] | sourceId | Source address of the call |
[in] | destinationId | Destination address of the call |
[in] | Uaverage | Average of all voltage measurements during the last second. |
[in] | I14average | Average of all current measurements (low range) during the last second. |
[in] | I180average | Average of all current measurements (high range) during the last second. |
[in] | PActiveLow | Calibrated energy measurement of the last second (low range). |
[in] | PActiveHigh | Calibrated energy measurement of the last second (high range). |
typedef void(* CircuitEnergyMeterValue_get_request_callback_t)(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId) |
Return the current energy and power metering values.
Request callback function prototype for call CircuitEnergyMeterValue_get.
To register this callback function, call the DsmApiSetCallback function with MessageType = DS485_CONTAINER_REQUEST, MessageId = CIRCUIT_ENERGY_METER_VALUE and ModifierId = CIRCUIT_ENERGY_METER_VALUE_GET
[in] | error | Error result of the (potential) previous call. |
[in] | arg | User data |
[in] | sourceId | Source address of the call |
[in] | destinationId | Destination address of the call |
typedef void(* CircuitEnergyMeterValue_get_response_callback_t)(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId, uint32_t PowerW, uint32_t EnergyWh) |
Return the current energy and power metering values.
Response callback function prototype for call CircuitEnergyMeterValue_get.
To register this callback function, call the DsmApiSetCallback function with MessageType = DS485_CONTAINER_RESPONSE, MessageId = CIRCUIT_ENERGY_METER_VALUE and ModifierId = CIRCUIT_ENERGY_METER_VALUE_GET
[in] | error | Error result of the (potential) previous call. |
[in] | arg | User data |
[in] | sourceId | Source address of the call |
[in] | destinationId | Destination address of the call |
[in] | PowerW | Current power [W]. |
[in] | EnergyWh | Accumulated energy [Wh]. |
typedef void(* CircuitEnergyMeterValue_reset_request_callback_t)(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId) |
Return the current energy and power metering values.
Reset energy accumulator afterwards.
Request callback function prototype for call CircuitEnergyMeterValue_reset.
To register this callback function, call the DsmApiSetCallback function with MessageType = DS485_CONTAINER_REQUEST, MessageId = CIRCUIT_ENERGY_METER_VALUE and ModifierId = CIRCUIT_ENERGY_METER_VALUE_RESET
[in] | error | Error result of the (potential) previous call. |
[in] | arg | User data |
[in] | sourceId | Source address of the call |
[in] | destinationId | Destination address of the call |
typedef void(* CircuitEnergyMeterValue_reset_response_callback_t)(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId, uint32_t PowerW, uint32_t EnergyWh) |
Return the current energy and power metering values.
Reset energy accumulator afterwards.
Response callback function prototype for call CircuitEnergyMeterValue_reset.
To register this callback function, call the DsmApiSetCallback function with MessageType = DS485_CONTAINER_RESPONSE, MessageId = CIRCUIT_ENERGY_METER_VALUE and ModifierId = CIRCUIT_ENERGY_METER_VALUE_RESET
[in] | error | Error result of the (potential) previous call. |
[in] | arg | User data |
[in] | sourceId | Source address of the call |
[in] | destinationId | Destination address of the call |
[in] | PowerW | Current power [W]. |
[in] | EnergyWh | Accumulated energy [Wh]. |
typedef void(* CircuitEnergyMeterValue_Ws_get_request_callback_t)(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId) |
Return the current energy and power metering values.
Request callback function prototype for call CircuitEnergyMeterValue_Ws_get.
To register this callback function, call the DsmApiSetCallback function with MessageType = DS485_CONTAINER_REQUEST, MessageId = CIRCUIT_ENERGY_METER_VALUE and ModifierId = CIRCUIT_ENERGY_METER_VALUE_WS_GET
[in] | error | Error result of the (potential) previous call. |
[in] | arg | User data |
[in] | sourceId | Source address of the call |
[in] | destinationId | Destination address of the call |
typedef void(* CircuitEnergyMeterValue_Ws_get_response_callback_t)(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId, uint32_t PowerW, uint32_t EnergyWs) |
Return the current energy and power metering values.
Response callback function prototype for call CircuitEnergyMeterValue_Ws_get.
To register this callback function, call the DsmApiSetCallback function with MessageType = DS485_CONTAINER_RESPONSE, MessageId = CIRCUIT_ENERGY_METER_VALUE and ModifierId = CIRCUIT_ENERGY_METER_VALUE_WS_GET
[in] | error | Error result of the (potential) previous call. |
[in] | arg | User data |
[in] | sourceId | Source address of the call |
[in] | destinationId | Destination address of the call |
[in] | PowerW | Current power [W]. |
[in] | EnergyWs | Accumulated energy [Ws]. |
typedef void(* CircuitPingDevices_automatic_request_callback_t)(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId, uint16_t IntervalTime) |
Dynamically change the behavior of the pinging of devices.
Two types of device pinging are supported. One ping round: During the one ping round, every known (both active and inactive) dSD is ping'ed. Upon failure to respond, the same dSD is ping'ed up to two more times before the ping proceeds to the next dSD. Once all known dSDs have been pinged, the one ping round terminates. The time between any two consecutive pings is configurable. Automatic mode: In automatic mode, the dSM repeatedly loops over all known dSDs and pings everyone exactly once per loop. The time between any two consecutive pings in this mode is, again, configurable. In both ping modes, the time between consecutive pings can not be configured to be lower than 3000 ms. Start automatic (continuous) ping rounds.
Request callback function prototype for call CircuitPingDevices_automatic.
To register this callback function, call the DsmApiSetCallback function with MessageType = DS485_CONTAINER_REQUEST, MessageId = CIRCUIT_PING_DEVICES and ModifierId = CIRCUIT_PING_DEVICES_AUTOMATIC
[in] | error | Error result of the (potential) previous call. |
[in] | arg | User data |
[in] | sourceId | Source address of the call |
[in] | destinationId | Destination address of the call |
[in] | IntervalTime | Time between ping commands [milliseconds]. 0: take default value from config. |
typedef void(* CircuitPingDevices_automatic_response_callback_t)(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId) |
Dynamically change the behavior of the pinging of devices.
Two types of device pinging are supported. One ping round: During the one ping round, every known (both active and inactive) dSD is ping'ed. Upon failure to respond, the same dSD is ping'ed up to two more times before the ping proceeds to the next dSD. Once all known dSDs have been pinged, the one ping round terminates. The time between any two consecutive pings is configurable. Automatic mode: In automatic mode, the dSM repeatedly loops over all known dSDs and pings everyone exactly once per loop. The time between any two consecutive pings in this mode is, again, configurable. In both ping modes, the time between consecutive pings can not be configured to be lower than 3000 ms. Start automatic (continuous) ping rounds.
Response callback function prototype for call CircuitPingDevices_automatic.
To register this callback function, call the DsmApiSetCallback function with MessageType = DS485_CONTAINER_RESPONSE, MessageId = CIRCUIT_PING_DEVICES and ModifierId = CIRCUIT_PING_DEVICES_AUTOMATIC
[in] | error | Error result of the (potential) previous call. |
[in] | arg | User data |
[in] | sourceId | Source address of the call |
[in] | destinationId | Destination address of the call |
typedef void(* CircuitPingDevices_off_request_callback_t)(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId) |
Dynamically change the behavior of the pinging of devices.
Two types of device pinging are supported. One ping round: During the one ping round, every known (both active and inactive) dSD is ping'ed. Upon failure to respond, the same dSD is ping'ed up to two more times before the ping proceeds to the next dSD. Once all known dSDs have been pinged, the one ping round terminates. The time between any two consecutive pings is configurable. Automatic mode: In automatic mode, the dSM repeatedly loops over all known dSDs and pings everyone exactly once per loop. The time between any two consecutive pings in this mode is, again, configurable. In both ping modes, the time between consecutive pings can not be configured to be lower than 3000 ms. Stops any running ping round and disables further pinging.
Request callback function prototype for call CircuitPingDevices_off.
To register this callback function, call the DsmApiSetCallback function with MessageType = DS485_CONTAINER_REQUEST, MessageId = CIRCUIT_PING_DEVICES and ModifierId = CIRCUIT_PING_DEVICES_OFF
[in] | error | Error result of the (potential) previous call. |
[in] | arg | User data |
[in] | sourceId | Source address of the call |
[in] | destinationId | Destination address of the call |
typedef void(* CircuitPingDevices_off_response_callback_t)(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId) |
Dynamically change the behavior of the pinging of devices.
Two types of device pinging are supported. One ping round: During the one ping round, every known (both active and inactive) dSD is ping'ed. Upon failure to respond, the same dSD is ping'ed up to two more times before the ping proceeds to the next dSD. Once all known dSDs have been pinged, the one ping round terminates. The time between any two consecutive pings is configurable. Automatic mode: In automatic mode, the dSM repeatedly loops over all known dSDs and pings everyone exactly once per loop. The time between any two consecutive pings in this mode is, again, configurable. In both ping modes, the time between consecutive pings can not be configured to be lower than 3000 ms. Stops any running ping round and disables further pinging.
Response callback function prototype for call CircuitPingDevices_off.
To register this callback function, call the DsmApiSetCallback function with MessageType = DS485_CONTAINER_RESPONSE, MessageId = CIRCUIT_PING_DEVICES and ModifierId = CIRCUIT_PING_DEVICES_OFF
[in] | error | Error result of the (potential) previous call. |
[in] | arg | User data |
[in] | sourceId | Source address of the call |
[in] | destinationId | Destination address of the call |
typedef void(* CircuitPingDevices_one_time_automatic_request_callback_t)(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId, uint16_t OneTimeIntervalTime, uint16_t AutoIntervalTime) |
Dynamically change the behavior of the pinging of devices.
Two types of device pinging are supported. One ping round: During the one ping round, every known (both active and inactive) dSD is ping'ed. Upon failure to respond, the same dSD is ping'ed up to two more times before the ping proceeds to the next dSD. Once all known dSDs have been pinged, the one ping round terminates. The time between any two consecutive pings is configurable. Automatic mode: In automatic mode, the dSM repeatedly loops over all known dSDs and pings everyone exactly once per loop. The time between any two consecutive pings in this mode is, again, configurable. In both ping modes, the time between consecutive pings can not be configured to be lower than 3000 ms. Execute one ping round with the given OneTimeIntervalTime and switches to automatic mode afterwards.
Request callback function prototype for call CircuitPingDevices_one_time_automatic.
To register this callback function, call the DsmApiSetCallback function with MessageType = DS485_CONTAINER_REQUEST, MessageId = CIRCUIT_PING_DEVICES and ModifierId = CIRCUIT_PING_DEVICES_ONE_TIME_AUTOMATIC
[in] | error | Error result of the (potential) previous call. |
[in] | arg | User data |
[in] | sourceId | Source address of the call |
[in] | destinationId | Destination address of the call |
[in] | OneTimeIntervalTime | Time between ping commands [milliseconds] in one-time round. 0: take default value from config. |
[in] | AutoIntervalTime | Time between ping commands [milliseconds] consecutive automatic rounds. 0: take default value value from config. |
typedef void(* CircuitPingDevices_one_time_automatic_response_callback_t)(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId) |
Dynamically change the behavior of the pinging of devices.
Two types of device pinging are supported. One ping round: During the one ping round, every known (both active and inactive) dSD is ping'ed. Upon failure to respond, the same dSD is ping'ed up to two more times before the ping proceeds to the next dSD. Once all known dSDs have been pinged, the one ping round terminates. The time between any two consecutive pings is configurable. Automatic mode: In automatic mode, the dSM repeatedly loops over all known dSDs and pings everyone exactly once per loop. The time between any two consecutive pings in this mode is, again, configurable. In both ping modes, the time between consecutive pings can not be configured to be lower than 3000 ms. Execute one ping round with the given OneTimeIntervalTime and switches to automatic mode afterwards.
Response callback function prototype for call CircuitPingDevices_one_time_automatic.
To register this callback function, call the DsmApiSetCallback function with MessageType = DS485_CONTAINER_RESPONSE, MessageId = CIRCUIT_PING_DEVICES and ModifierId = CIRCUIT_PING_DEVICES_ONE_TIME_AUTOMATIC
[in] | error | Error result of the (potential) previous call. |
[in] | arg | User data |
[in] | sourceId | Source address of the call |
[in] | destinationId | Destination address of the call |
typedef void(* CircuitPingDevices_one_time_off_request_callback_t)(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId, uint16_t IntervalTime) |
Dynamically change the behavior of the pinging of devices.
Two types of device pinging are supported. One ping round: During the one ping round, every known (both active and inactive) dSD is ping'ed. Upon failure to respond, the same dSD is ping'ed up to two more times before the ping proceeds to the next dSD. Once all known dSDs have been pinged, the one ping round terminates. The time between any two consecutive pings is configurable. Automatic mode: In automatic mode, the dSM repeatedly loops over all known dSDs and pings everyone exactly once per loop. The time between any two consecutive pings in this mode is, again, configurable. In both ping modes, the time between consecutive pings can not be configured to be lower than 3000 ms. Execute one ping round.
Request callback function prototype for call CircuitPingDevices_one_time_off.
To register this callback function, call the DsmApiSetCallback function with MessageType = DS485_CONTAINER_REQUEST, MessageId = CIRCUIT_PING_DEVICES and ModifierId = CIRCUIT_PING_DEVICES_ONE_TIME_OFF
[in] | error | Error result of the (potential) previous call. |
[in] | arg | User data |
[in] | sourceId | Source address of the call |
[in] | destinationId | Destination address of the call |
[in] | IntervalTime | Time between ping commands [milliseconds]. 0: take default value from config. |
typedef void(* CircuitPingDevices_one_time_off_response_callback_t)(uint8_t error_code, void *arg, dsid_t sourceId, dsid_t destinationId) |
Dynamically change the behavior of the pinging of devices.
Two types of device pinging are supported. One ping round: During the one ping round, every known (both active and inactive) dSD is ping'ed. Upon failure to respond, the same dSD is ping'ed up to two more times before the ping proceeds to the next dSD. Once all known dSDs have been pinged, the one ping round terminates. The time between any two consecutive pings is configurable. Automatic mode: In automatic mode, the dSM repeatedly loops over all known dSDs and pings everyone exactly once per loop. The time between any two consecutive pings in this mode is, again, configurable. In both ping modes, the time between consecutive pings can not be configured to be lower than 3000 ms. Execute one ping round.
Response callback function prototype for call CircuitPingDevices_one_time_off.
To register this callback function, call the DsmApiSetCallback function with MessageType = DS485_CONTAINER_RESPONSE, MessageId = CIRCUIT_PING_DEVICES and ModifierId = CIRCUIT_PING_DEVICES_ONE_TIME_OFF
[in] | error | Error result of the (potential) previous call. |
[in] | arg | User data |
[in] | sourceId | Source address of the call |
[in] | destinationId | Destination address of the call |
int CircuitCurrentMeterValue_get | ( | DsmApiHandle_t | handle, |
dsid_t | dSMdSID, | ||
uint16_t * | PowerW, | ||
uint16_t * | PowerQ, | ||
uint16_t * | Phi | ||
) |
Return the current active and reactive power metering values.
Also calculated phase.
This call has a timeout of 5 seconds.
To receive asynchronous responses to this call (e.g. when addressing broadcast) register the CircuitCurrentMeterValue_get_response_callback_t callback. To receive this request from other bus members register the CircuitCurrentMeterValue_get_request_callback_t callback.
[in] | handle | Handle to the library instance |
[in] | dSMdSID | Destination dSM of the call |
[out] | PowerW | Current active power [W]. |
[out] | PowerQ | Current reactive power [var]. |
[out] | Phi | Phase [rad] (multiplied with 2^14). |
int CircuitEnergyMeterValue_calibration | ( | DsmApiHandle_t | handle, |
dsid_t | dSMdSID, | ||
uint16_t * | Uaverage, | ||
uint16_t * | I14average, | ||
uint16_t * | I180average, | ||
uint32_t * | PActiveLow, | ||
uint32_t * | PActiveHigh | ||
) |
Read the values necessary for metering calibration.
This call has a timeout of 5 seconds.
To receive asynchronous responses to this call (e.g. when addressing broadcast) register the CircuitEnergyMeterValue_calibration_response_callback_t callback. To receive this request from other bus members register the CircuitEnergyMeterValue_calibration_request_callback_t callback.
[in] | handle | Handle to the library instance |
[in] | dSMdSID | Destination dSM of the call |
[out] | Uaverage | Average of all voltage measurements during the last second. |
[out] | I14average | Average of all current measurements (low range) during the last second. |
[out] | I180average | Average of all current measurements (high range) during the last second. |
[out] | PActiveLow | Calibrated energy measurement of the last second (low range). |
[out] | PActiveHigh | Calibrated energy measurement of the last second (high range). |
int CircuitEnergyMeterValue_get | ( | DsmApiHandle_t | handle, |
dsid_t | dSMdSID, | ||
uint32_t * | PowerW, | ||
uint32_t * | EnergyWh | ||
) |
Return the current energy and power metering values.
This call has a timeout of 5 seconds.
To receive asynchronous responses to this call (e.g. when addressing broadcast) register the CircuitEnergyMeterValue_get_response_callback_t callback. To receive this request from other bus members register the CircuitEnergyMeterValue_get_request_callback_t callback.
[in] | handle | Handle to the library instance |
[in] | dSMdSID | Destination dSM of the call |
[out] | PowerW | Current power [W]. |
[out] | EnergyWh | Accumulated energy [Wh]. |
int CircuitEnergyMeterValue_reset | ( | DsmApiHandle_t | handle, |
dsid_t | dSMdSID, | ||
uint32_t * | PowerW, | ||
uint32_t * | EnergyWh | ||
) |
Return the current energy and power metering values.
Reset energy accumulator afterwards.
This call has a timeout of 5 seconds.
To receive asynchronous responses to this call (e.g. when addressing broadcast) register the CircuitEnergyMeterValue_reset_response_callback_t callback. To receive this request from other bus members register the CircuitEnergyMeterValue_reset_request_callback_t callback.
[in] | handle | Handle to the library instance |
[in] | dSMdSID | Destination dSM of the call |
[out] | PowerW | Current power [W]. |
[out] | EnergyWh | Accumulated energy [Wh]. |
int CircuitEnergyMeterValue_Ws_get | ( | DsmApiHandle_t | handle, |
dsid_t | dSMdSID, | ||
uint32_t * | PowerW, | ||
uint32_t * | EnergyWs | ||
) |
Return the current energy and power metering values.
This call has a timeout of 5 seconds.
To receive asynchronous responses to this call (e.g. when addressing broadcast) register the CircuitEnergyMeterValue_Ws_get_response_callback_t callback. To receive this request from other bus members register the CircuitEnergyMeterValue_Ws_get_request_callback_t callback.
[in] | handle | Handle to the library instance |
[in] | dSMdSID | Destination dSM of the call |
[out] | PowerW | Current power [W]. |
[out] | EnergyWs | Accumulated energy [Ws]. |
int CircuitPingDevices_automatic | ( | DsmApiHandle_t | handle, |
dsid_t | dSMdSID, | ||
uint16_t | IntervalTime | ||
) |
Dynamically change the behavior of the pinging of devices.
Two types of device pinging are supported. One ping round: During the one ping round, every known (both active and inactive) dSD is ping'ed. Upon failure to respond, the same dSD is ping'ed up to two more times before the ping proceeds to the next dSD. Once all known dSDs have been pinged, the one ping round terminates. The time between any two consecutive pings is configurable. Automatic mode: In automatic mode, the dSM repeatedly loops over all known dSDs and pings everyone exactly once per loop. The time between any two consecutive pings in this mode is, again, configurable. In both ping modes, the time between consecutive pings can not be configured to be lower than 3000 ms. Start automatic (continuous) ping rounds.
This call has a timeout of 5 seconds.
To receive asynchronous responses to this call (e.g. when addressing broadcast) register the CircuitPingDevices_automatic_response_callback_t callback. To receive this request from other bus members register the CircuitPingDevices_automatic_request_callback_t callback.
[in] | handle | Handle to the library instance |
[in] | dSMdSID | Destination dSM of the call |
[in] | IntervalTime | Time between ping commands [milliseconds]. 0: take default value from config. |
int CircuitPingDevices_off | ( | DsmApiHandle_t | handle, |
dsid_t | dSMdSID | ||
) |
Dynamically change the behavior of the pinging of devices.
Two types of device pinging are supported. One ping round: During the one ping round, every known (both active and inactive) dSD is ping'ed. Upon failure to respond, the same dSD is ping'ed up to two more times before the ping proceeds to the next dSD. Once all known dSDs have been pinged, the one ping round terminates. The time between any two consecutive pings is configurable. Automatic mode: In automatic mode, the dSM repeatedly loops over all known dSDs and pings everyone exactly once per loop. The time between any two consecutive pings in this mode is, again, configurable. In both ping modes, the time between consecutive pings can not be configured to be lower than 3000 ms. Stops any running ping round and disables further pinging.
This call has a timeout of 5 seconds.
To receive asynchronous responses to this call (e.g. when addressing broadcast) register the CircuitPingDevices_off_response_callback_t callback. To receive this request from other bus members register the CircuitPingDevices_off_request_callback_t callback.
[in] | handle | Handle to the library instance |
[in] | dSMdSID | Destination dSM of the call |
int CircuitPingDevices_one_time_automatic | ( | DsmApiHandle_t | handle, |
dsid_t | dSMdSID, | ||
uint16_t | OneTimeIntervalTime, | ||
uint16_t | AutoIntervalTime | ||
) |
Dynamically change the behavior of the pinging of devices.
Two types of device pinging are supported. One ping round: During the one ping round, every known (both active and inactive) dSD is ping'ed. Upon failure to respond, the same dSD is ping'ed up to two more times before the ping proceeds to the next dSD. Once all known dSDs have been pinged, the one ping round terminates. The time between any two consecutive pings is configurable. Automatic mode: In automatic mode, the dSM repeatedly loops over all known dSDs and pings everyone exactly once per loop. The time between any two consecutive pings in this mode is, again, configurable. In both ping modes, the time between consecutive pings can not be configured to be lower than 3000 ms. Execute one ping round with the given OneTimeIntervalTime and switches to automatic mode afterwards.
This call has a timeout of 5 seconds.
To receive asynchronous responses to this call (e.g. when addressing broadcast) register the CircuitPingDevices_one_time_automatic_response_callback_t callback. To receive this request from other bus members register the CircuitPingDevices_one_time_automatic_request_callback_t callback.
[in] | handle | Handle to the library instance |
[in] | dSMdSID | Destination dSM of the call |
[in] | OneTimeIntervalTime | Time between ping commands [milliseconds] in one-time round. 0: take default value from config. |
[in] | AutoIntervalTime | Time between ping commands [milliseconds] consecutive automatic rounds. 0: take default value value from config. |
int CircuitPingDevices_one_time_off | ( | DsmApiHandle_t | handle, |
dsid_t | dSMdSID, | ||
uint16_t | IntervalTime | ||
) |
Dynamically change the behavior of the pinging of devices.
Two types of device pinging are supported. One ping round: During the one ping round, every known (both active and inactive) dSD is ping'ed. Upon failure to respond, the same dSD is ping'ed up to two more times before the ping proceeds to the next dSD. Once all known dSDs have been pinged, the one ping round terminates. The time between any two consecutive pings is configurable. Automatic mode: In automatic mode, the dSM repeatedly loops over all known dSDs and pings everyone exactly once per loop. The time between any two consecutive pings in this mode is, again, configurable. In both ping modes, the time between consecutive pings can not be configured to be lower than 3000 ms. Execute one ping round.
This call has a timeout of 5 seconds.
To receive asynchronous responses to this call (e.g. when addressing broadcast) register the CircuitPingDevices_one_time_off_response_callback_t callback. To receive this request from other bus members register the CircuitPingDevices_one_time_off_request_callback_t callback.
[in] | handle | Handle to the library instance |
[in] | dSMdSID | Destination dSM of the call |
[in] | IntervalTime | Time between ping commands [milliseconds]. 0: take default value from config. |