dsm-api-v2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
Convenience Functions

This is a group of convenience functions used to simplify the interaction with digitalSTROM(r) devices. More...

Functions

int DsmApiExpandDeviceDSID (uint16_t vendorId, uint32_t serialNumber, dsid_t *dsid) __attribute__((deprecated))
 Expand a combination of VendorId and Serial number to a unique dSID. More...
 
int DsmApiGetDeviceDescription (uint16_t vendorId, uint16_t productId, uint8_t groupId, uint16_t revisionId, char **displayName, char **hardwareInfo, char **gtin)
 Expand a combination of product properties to a universal description and GTIN number. More...
 
int DsmApiGetDeviceDSID (uint16_t vendorId, uint16_t productId, uint8_t groupId, uint16_t revisionId, uint32_t serialNumber, dsid_t *dsid)
 Convert a combination of product properties and serial number to a unique dSID. More...
 
int DsmApiGetEthernetDSID (const char *mac, dsid_t *dsid)
 Convert a IEEE address into a unique dSID. More...
 
int DsmApiIsdSM (dsid_t dSMdSID)
 Check if a given dSID belongs to a dSM. More...
 

Detailed Description

This is a group of convenience functions used to simplify the interaction with digitalSTROM(r) devices.

Function Documentation

int DsmApiExpandDeviceDSID ( uint16_t  vendorId,
uint32_t  serialNumber,
dsid_t dsid 
)

Expand a combination of VendorId and Serial number to a unique dSID.

Deprecated:
This function is deprecated
Parameters
[in]vendorIdVendorId of the device
[in]serialNumberSerial number of the device
[out]dsidContains the dSID of the device.
Returns
0 on success, -1 if VendorId is unknown (dSID contains only serial number)
int DsmApiGetDeviceDescription ( uint16_t  vendorId,
uint16_t  productId,
uint8_t  groupId,
uint16_t  revisionId,
char **  displayName,
char **  hardwareInfo,
char **  gtin 
)

Expand a combination of product properties to a universal description and GTIN number.

Parameters
[in]vendorIdVendorId of the device
[in]productIdProductId of the device
[in]groupIdStandard-Function of the device
[in]revisionIdFirmare RevisionId of the device
[out]displayNameContains the display name of the product
[out]hardwareInfoContains the hardware info string
[out]gtinContains the GTIN string
Returns
0 on success, -1 if product is unknown
int DsmApiGetDeviceDSID ( uint16_t  vendorId,
uint16_t  productId,
uint8_t  groupId,
uint16_t  revisionId,
uint32_t  serialNumber,
dsid_t dsid 
)

Convert a combination of product properties and serial number to a unique dSID.

Parameters
[in]vendorIdVendorId of the device
[in]productIdProductId of the device
[in]groupIdStandard-Function of the device
[in]revisionIdFirmare RevisionId of the device
[in]serialNumberSerial number of the device
[out]dsidContains the dSID of the device.
Returns
0 on success, ERROR_DSID_CONVERSION if product is unknown, dSID is 0 and contains only serial number
int DsmApiGetEthernetDSID ( const char *  mac,
dsid_t dsid 
)

Convert a IEEE address into a unique dSID.

Parameters
[in]macMAC Address of the device
[out]dsidContains the dSID of the device.
Returns
0, if IEEE prefix and device is known, else ERROR_DSID_CONVERSION
int DsmApiIsdSM ( dsid_t  dSMdSID)

Check if a given dSID belongs to a dSM.

Parameters
[in]dSMdSIDdSID of the device in question
Returns
0: device is no dSM, 1: device is a dSM