|
ASX Version4.37.03
|
These functions implement device wide CobraNet settings. More...
Functions | |
| ASX32_API ASX_ERROR | ASX_Cobranet_EnumerateModes (ASX_HANDLE hCobranet, const int nIndex, enum asxCOBRANET_MODE *peMode, int *pnCount) |
| ASX32_API ASX_ERROR | ASX_Cobranet_GetMode (ASX_HANDLE hCobranet, enum asxCOBRANET_MODE *peMode) |
| ASX32_API ASX_ERROR | ASX_Cobranet_SetMode (ASX_HANDLE hCobranet, const enum asxCOBRANET_MODE eMode) |
| ASX32_API ASX_ERROR | ASX_Cobranet_GetIPAddress (ASX_HANDLE hCobranet, unsigned int *pdwIPAddr) |
| Get the current IP address of the Cobranet device. | |
| ASX32_API ASX_ERROR | ASX_Cobranet_SetIPAddress (ASX_HANDLE hCobranet, const unsigned int dwIPAddr) |
| Set the current IP address of the Cobranet device. | |
| ASX32_API ASX_ERROR | ASX_Cobranet_GetStaticIPAddress (ASX_HANDLE hCobranet, unsigned int *pdwIPAddr) |
| Get the static IP address of the Cobranet device. | |
| ASX32_API ASX_ERROR | ASX_Cobranet_SetStaticIPAddress (ASX_HANDLE hCobranet, const unsigned int dwIPAddr) |
| Set the static IP address of the Cobranet device. | |
| ASX32_API ASX_ERROR | ASX_Cobranet_GetMACAddress (ASX_HANDLE hCobranet, unsigned int *pdwMAC_MSBs, unsigned short *pwMAC_LSBs) |
| Get the current cobranet MAC address. | |
| ASX32_API ASX_ERROR | ASX_Cobranet_GetDescription (ASX_HANDLE hCobranet, char *szString, const int nLength) |
| Get the device's description from the sysDescr SNMP field. | |
| ASX32_API ASX_ERROR | ASX_Cobranet_GetName (ASX_HANDLE hCobranet, char *szString, const int nLength) |
| Get the device's name from the sysName SNMP field. | |
| ASX32_API ASX_ERROR | ASX_Cobranet_SetName (ASX_HANDLE hCobranet, const char *pszLongInputString) |
| Set the device's name in the sysName SNMP field. | |
| ASX32_API ASX_ERROR | ASX_Cobranet_GetLocation (ASX_HANDLE hCobranet, char *szString, const int nLength) |
| Get the device's location from the sysLocation SNMP field. | |
| ASX32_API ASX_ERROR | ASX_Cobranet_SetLocation (ASX_HANDLE hCobranet, const char *pszLongInputString) |
| Set the device's location in the sysLocation SNMP field. | |
| ASX32_API ASX_ERROR | ASX_Cobranet_GetFirmwareRevision (ASX_HANDLE hCobranet, char *pszRevision) |
| Gets a device's firmware revision. | |
| ASX32_API ASX_ERROR | ASX_Cobranet_GetErrorInfo (ASX_HANDLE hCobranet, unsigned int *pnCode, unsigned int *pnCount, unsigned int *pnDisplay) |
| Gets a device's error information. | |
| ASX32_API ASX_ERROR | ASX_Cobranet_GetLatencyAndSampleRate (ASX_HANDLE hCobranet, enum asxCOBRANET_LATENCY *peLatency, enum asxSAMPLE_RATE *peRate) |
| Gets a device's latency and sample reate. | |
| ASX32_API ASX_ERROR | ASX_Cobranet_SetLatencyAndSampleRate (ASX_HANDLE hCobranet, const enum asxCOBRANET_LATENCY eLatency, const enum asxSAMPLE_RATE eRate) |
| Gets a device's latency and sample reate. | |
| ASX32_API ASX_ERROR | ASX_Cobranet_GetPersistence (ASX_HANDLE hCobranet, unsigned int *pnSetting) |
| Gets a device's flash persistence setting. | |
| ASX32_API ASX_ERROR | ASX_Cobranet_SetPersistence (ASX_HANDLE hCobranet, const unsigned int nSetting) |
| Sets a device's flash persistence state. | |
| ASX32_API ASX_ERROR | ASX_Cobranet_GetConductorPriority (ASX_HANDLE hCobranet, unsigned int *pnPriority) |
| Gets a device's conductor priority. | |
| ASX32_API ASX_ERROR | ASX_Cobranet_SetConductorPriority (ASX_HANDLE hCobranet, const unsigned int nPriority) |
| Sets a device's conductor priority. | |
| ASX32_API ASX_ERROR | ASX_Cobranet_GetConductorStatus (ASX_HANDLE hCobranet, unsigned int *pnState) |
| Gets a device's conductor status. | |
| ASX32_API ASX_ERROR | ASX_Cobranet_SetSerialEnable (ASX_HANDLE hCobranet, const int nOnOff) |
| Enable or disable a device's serial bridge. | |
| ASX32_API ASX_ERROR | ASX_Cobranet_GetSerialEnable (ASX_HANDLE hCobranet, int *pOnOff) |
| Gets a device's serial bridge status. | |
| ASX32_API ASX_ERROR | ASX_Cobranet_SetSerialConfig (ASX_HANDLE hCobranet, const unsigned int nBaud, const unsigned int nPPeriod, const char pRxMAC[6], const int nAcceptUnicast, const char pTxMAC[6]) |
| Configures a device's serial bridge. | |
| ASX32_API ASX_ERROR | ASX_Cobranet_GetSerialConfig (ASX_HANDLE hCobranet, unsigned int *pnBaud, unsigned int *pnPPeriod, char pRxMAC[6], int *pnAcceptUnicast, char pTxMAC[6]) |
| Gets a device's serial bridge configuration. | |
| ASX32_API ASX_ERROR | ASX_Cobranet_GetIfStatus (ASX_HANDLE hCobranet, unsigned int *pnCurrentIf, unsigned int *pnPrimaryLinkStatus, unsigned int *pnSecondaryLinkStatus) |
| Gets a device's ethernet connection status. | |
These functions implement device wide CobraNet settings.
The reader is referred to "CobraNet Programmer's Reference",Cirrus Logic, http://www.cirrus.com , for more information.
| ASX32_API ASX_ERROR ASX_Cobranet_EnumerateModes | ( | ASX_HANDLE | hCobranet, |
| const int | nIndex, | ||
| enum asxCOBRANET_MODE * | peMode, | ||
| int * | pnCount | ||
| ) |
| ASX32_API ASX_ERROR ASX_Cobranet_GetConductorPriority | ( | ASX_HANDLE | hCobranet, |
| unsigned int * | pnPriority | ||
| ) |
Gets a device's conductor priority.
| hCobranet | A handle to an ASX cobranet control. |
| pnPriority | Returned Priority. 0 indcates that this device will never be the network conductor. 1 is the lowest priority and 0xFF is the highest priority. |
| ASX32_API ASX_ERROR ASX_Cobranet_GetConductorStatus | ( | ASX_HANDLE | hCobranet, |
| unsigned int * | pnState | ||
| ) |
Gets a device's conductor status.
| hCobranet | A handle to an ASX cobranet control. |
| pnState | Returned state. 1 indicates that this device is the conductor for the Cobranet network. 0 indicates that it is not the conductor. |
| ASX32_API ASX_ERROR ASX_Cobranet_GetDescription | ( | ASX_HANDLE | hCobranet, |
| char * | szString, | ||
| const int | nLength | ||
| ) |
Get the device's description from the sysDescr SNMP field.
This is are read-only operation.
| hCobranet | A handle to an ASX cobranet control. |
| szString | Pointer to a string of length ASX_LONG_STRING. |
| nLength | Description string length. |
| ASX32_API ASX_ERROR ASX_Cobranet_GetErrorInfo | ( | ASX_HANDLE | hCobranet, |
| unsigned int * | pnCode, | ||
| unsigned int * | pnCount, | ||
| unsigned int * | pnDisplay | ||
| ) |
Gets a device's error information.
Returns SNMP variables errorCode, errorCount and errorDisplay.
| hCobranet | A handle to an ASX cobranet control. |
| pnCode | Pointer used to return error code. See error code listing the Cobranet Programmer Manual from Cirrus Logic. |
| pnCount | Pointer used to return error count which contains the number of errors that have occurred. |
| pnDisplay | Pointer used to return error display number. |
| ASX32_API ASX_ERROR ASX_Cobranet_GetFirmwareRevision | ( | ASX_HANDLE | hCobranet, |
| char * | pszRevision | ||
| ) |
Gets a device's firmware revision.
This is a combination of SNMP fields firmwareProtocolVersion, firmwareMajorVersion and firmwareMinorVersion.
| hCobranet | A handle to an ASX cobranet control. |
| pszRevision | A pointer to a char array of length ASX_SHORT_STRING to return the revision string. |
| ASX32_API ASX_ERROR ASX_Cobranet_GetIfStatus | ( | ASX_HANDLE | hCobranet, |
| unsigned int * | pnCurrentIf, | ||
| unsigned int * | pnPrimaryLinkStatus, | ||
| unsigned int * | pnSecondaryLinkStatus | ||
| ) |
Gets a device's ethernet connection status.
| hCobranet | A handle to an ASX cobranet control. |
| pnCurrentIf | Returns which ethernet connection is active (1 for primary, 2 for secondary) |
| pnPrimaryLinkStatus | Returns primary link status. See asxCOBRANET_IFSTATUS. |
| pnSecondaryLinkStatus | Returns secondary link status. See asxCOBRANET_IFSTATUS. |
| ASX32_API ASX_ERROR ASX_Cobranet_GetIPAddress | ( | ASX_HANDLE | hCobranet, |
| unsigned int * | pdwIPAddr | ||
| ) |
Get the current IP address of the Cobranet device.
| hCobranet | A handle to an ASX cobranet control. |
| pdwIPAddr | Gets the IP address. |
| ASX32_API ASX_ERROR ASX_Cobranet_GetLatencyAndSampleRate | ( | ASX_HANDLE | hCobranet, |
| enum asxCOBRANET_LATENCY * | peLatency, | ||
| enum asxSAMPLE_RATE * | peRate | ||
| ) |
Gets a device's latency and sample reate.
Returns information from SNMP variable modeRateControl.
| hCobranet | A handle to an ASX cobranet control. |
| peLatency | Pointer used to return latency. |
| peRate | Pointer used to return sample rate. |
| ASX32_API ASX_ERROR ASX_Cobranet_GetLocation | ( | ASX_HANDLE | hCobranet, |
| char * | szString, | ||
| const int | nLength | ||
| ) |
Get the device's location from the sysLocation SNMP field.
| hCobranet | A handle to an ASX cobranet control. |
| szString | Pointer to a string of length ASX_LONG_STRING. |
| nLength | Name string length. |
| ASX32_API ASX_ERROR ASX_Cobranet_GetMACAddress | ( | ASX_HANDLE | hCobranet, |
| unsigned int * | pdwMAC_MSBs, | ||
| unsigned short * | pwMAC_LSBs | ||
| ) |
Get the current cobranet MAC address.
| hCobranet | A handle to an ASX cobranet control. |
| pdwMAC_MSBs | Gets the four most significant bytes of the MAC address. |
| pwMAC_LSBs | Gets the two least significant bytes of the MAC address. |
| ASX32_API ASX_ERROR ASX_Cobranet_GetMode | ( | ASX_HANDLE | hCobranet, |
| enum asxCOBRANET_MODE * | peMode | ||
| ) |
| ASX32_API ASX_ERROR ASX_Cobranet_GetName | ( | ASX_HANDLE | hCobranet, |
| char * | szString, | ||
| const int | nLength | ||
| ) |
Get the device's name from the sysName SNMP field.
| hCobranet | A handle to an ASX cobranet control. |
| szString | Pointer to a string of length ASX_LONG_STRING. |
| nLength | Name string length. |
| ASX32_API ASX_ERROR ASX_Cobranet_GetPersistence | ( | ASX_HANDLE | hCobranet, |
| unsigned int * | pnSetting | ||
| ) |
Gets a device's flash persistence setting.
Returns information from SNMP variable flashPersistEnable. This should be set to maintain static IP assignments and Cobranet bundle and routing assignments through a powerdown. Conversely, clearing the persistence bit and then powering cycling the ASI2416 will set it back to factory defaults.
| hCobranet | A handle to an ASX cobranet control. |
| pnSetting | 0 indicates no persistence set. Non-zero indicates persistence enabled. |
| ASX32_API ASX_ERROR ASX_Cobranet_GetSerialConfig | ( | ASX_HANDLE | hCobranet, |
| unsigned int * | pnBaud, | ||
| unsigned int * | pnPPeriod, | ||
| char | pRxMAC[6], | ||
| int * | pnAcceptUnicast, | ||
| char | pTxMAC[6] | ||
| ) |
Gets a device's serial bridge configuration.
| hCobranet | A handle to an ASX cobranet control. |
| pnBaud | Returns the baud rate for the serial bridge. |
| pnPPeriod | Returns the time in 256ths of a millisecond before a character received at the SCI port is placed in a packet and transmitted. |
| pRxMAC | Gets the multicast MAC from which SCI data will be accepted. |
| pnAcceptUnicast | Gets the state of the accept unicast flag. 1 = accept, 0 = ignore |
| pTxMAC | Gets the MAC to which SCI data is sent. |
| ASX32_API ASX_ERROR ASX_Cobranet_GetSerialEnable | ( | ASX_HANDLE | hCobranet, |
| int * | pOnOff | ||
| ) |
Gets a device's serial bridge status.
| hCobranet | A handle to an ASX cobranet control. |
| pOnOff | Returned state. 1 is on, 0 is off. |
| ASX32_API ASX_ERROR ASX_Cobranet_GetStaticIPAddress | ( | ASX_HANDLE | hCobranet, |
| unsigned int * | pdwIPAddr | ||
| ) |
Get the static IP address of the Cobranet device.
| hCobranet | A handle to an ASX cobranet control. |
| pdwIPAddr | Gets the static IP address. A value of 0 (0.0.0.0) indicates that no static IP address has been assigned to this device. |
| ASX32_API ASX_ERROR ASX_Cobranet_SetConductorPriority | ( | ASX_HANDLE | hCobranet, |
| const unsigned int | nPriority | ||
| ) |
Sets a device's conductor priority.
| hCobranet | A handle to an ASX cobranet control. |
| nPriority | Priority to set. 0 indcates that this device will never be the network conductor. 1 is the lowest priority and 0xFF is the highest priority. |
| ASX32_API ASX_ERROR ASX_Cobranet_SetIPAddress | ( | ASX_HANDLE | hCobranet, |
| const unsigned int | dwIPAddr | ||
| ) |
Set the current IP address of the Cobranet device.
| hCobranet | A handle to an ASX cobranet control. |
| dwIPAddr | The IP address to set. |
| ASX32_API ASX_ERROR ASX_Cobranet_SetLatencyAndSampleRate | ( | ASX_HANDLE | hCobranet, |
| const enum asxCOBRANET_LATENCY | eLatency, | ||
| const enum asxSAMPLE_RATE | eRate | ||
| ) |
Gets a device's latency and sample reate.
Returns information from SNMP variable modeRateControl.
| hCobranet | A handle to an ASX cobranet control. |
| eLatency | Latency to set. |
| eRate | Sample rate to set. Note that the ASI2416 only supports a sample rate of 48 kHz. |
| ASX32_API ASX_ERROR ASX_Cobranet_SetLocation | ( | ASX_HANDLE | hCobranet, |
| const char * | pszLongInputString | ||
| ) |
Set the device's location in the sysLocation SNMP field.
Maximum name length is 60 characters.
| hCobranet | A handle to an ASX cobranet control. |
| pszLongInputString | Pointer to a 0 terminated string of length ASX_LONG_STRING. Only the first 60 characters of the string should be used. |
| ASX32_API ASX_ERROR ASX_Cobranet_SetMode | ( | ASX_HANDLE | hCobranet, |
| const enum asxCOBRANET_MODE | eMode | ||
| ) |
| ASX32_API ASX_ERROR ASX_Cobranet_SetName | ( | ASX_HANDLE | hCobranet, |
| const char * | pszLongInputString | ||
| ) |
Set the device's name in the sysName SNMP field.
Maximum name length is 60 characters.
| hCobranet | A handle to an ASX cobranet control. |
| pszLongInputString | Pointer to a 0 terminated string of length ASX_LONG_STRING. Only the first 60 characters of the string should be used. |
| ASX32_API ASX_ERROR ASX_Cobranet_SetPersistence | ( | ASX_HANDLE | hCobranet, |
| const unsigned int | nSetting | ||
| ) |
Sets a device's flash persistence state.
Writes setting to SNMP variable flashPersistEnable. This should be set to maintain static IP assignments and Cobranet bundle and routing assignments through a powerdown. Conversely, clearing the persistence bit and then powering cycling the ASI2416 will set it back to factory defaults.
| hCobranet | A handle to an ASX cobranet control. |
| nSetting | 0 indicates no persistence set. Non-zero indicates persistence enabled. |
| ASX32_API ASX_ERROR ASX_Cobranet_SetSerialConfig | ( | ASX_HANDLE | hCobranet, |
| const unsigned int | nBaud, | ||
| const unsigned int | nPPeriod, | ||
| const char | pRxMAC[6], | ||
| const int | nAcceptUnicast, | ||
| const char | pTxMAC[6] | ||
| ) |
Configures a device's serial bridge.
| hCobranet | A handle to an ASX cobranet control. |
| nBaud | The baud rate for the serial bridge. |
| nPPeriod | Time in 256ths of a millisecond before a character received at the SCI port is placed in a packet and transmitted. |
| pRxMAC | Sets the multicast MAC from which SCI data will be accepted. |
| nAcceptUnicast | Set to accept properly unicast addressed data in addition to data addressed in accordance to pRxMAC. 1 = accept, 0 = ignore |
| pTxMAC | Sets the MAC address (unicast or multicast) to which SCI data is sent. |
| ASX32_API ASX_ERROR ASX_Cobranet_SetSerialEnable | ( | ASX_HANDLE | hCobranet, |
| const int | nOnOff | ||
| ) |
Enable or disable a device's serial bridge.
| hCobranet | A handle to an ASX cobranet control. |
| nOnOff | 1 is on, 0 is off. |
| ASX32_API ASX_ERROR ASX_Cobranet_SetStaticIPAddress | ( | ASX_HANDLE | hCobranet, |
| const unsigned int | dwIPAddr | ||
| ) |
Set the static IP address of the Cobranet device.
| hCobranet | A handle to an ASX cobranet control. |
| dwIPAddr | The static IP address to set. A value of 0 resets the static IP address. The assigned static IP address will not take effect until the device is restarted. |
1.7.3