Retrieves complete status and statistics for a digital T1/E1 trunk.
DWORD dtmGetTrunkStatus ( DTMHD dtmhd, DTM_TRUNK_STATUS *status, unsigned size)
|
Argument |
Description |
|
dtmhd |
Handle to the trunk monitor object. |
|
status |
Pointer to the DTM_TRUNK_STATUS structure: typedef struct |
|
size |
Size, in bytes, of the DTM_TRUNK_STATUS structure. |
|
Return value |
Description |
|
SUCCESS |
|
|
CTAERR_INVALID_HANDLE |
dtmhd is not a valid monitor handle. |
|
CTAERR_SVR_COMM |
Communication error in server environment. |
dtmGetTrunkStatus retrieves the digital trunk status from the DTM service. The DTM service caches the most recent status and error counters received from the board. dtmGetTrunkStatus retrieves the status and counters and stores them in a DTM_TRUNK_STATUS structure.
This is a synchronous function that copies data from the service context into the caller's buffer.
The same status structure is used for both E1 and T1 boards. The first DWORD contains the size of the returned structure.
The status structure that is stored in the service context is updated each time an event is received from the board. If full reporting is not enabled (as specified in the reportmask field in DTM_START_PARMS), the data may not reflect the current state of the board unless dtmGetTrunkStatus was immediately preceded by an event. Use dtmRefreshTrunkStatus to force an event to be generated.