int smdc_line_status(struct smdc_line_status_parms *statusp)
typedef struct smdc_line_status_parms { tSMChannelId channel; /* in */ enum kSMDCLinkStatus { kSMDCLinkStatusNotConnected, kSMDCLinkStatusConnecting, kSMDCLinkStatusConnected, kSMDCLinkStatusDisconnecting, } link_status; /* out */ enum kSMDCLineRxStatus { kSMDCRxStatusNoCarrier, kSMDCRxStatusCarrierPresent, kSMDCRxStatusReceivingData, } rx_status; /* out */ enum kSMDCLineTxStatus { kSMDCTxStatusSilent, kSMDCTxStatusSendingCarrier, kSMDCTxStatusSendingData, } tx_status; /* out */ tSM_INT tx_cts; /* out */ } SMDC_LINE_STATUS_PARMS;
This function is deprecated in favour of using smdc_rx_status() and smdc_tx_status().
Reports the status of a channel used for data communications. If its input half has not been configured for data communications, then the field rx_status will contain the value kSMDCRxStatusNoCarrier, otherwise it indicates status of the input half of the channel. Note that it is not normally appropriate to distinguish between kSMDCRxStatusCarrierPresent and kSMDCRxStatusReceivingData since protocols can typically switch between them very quickly and the system only reports approximately to avoid the status changing very rapidly.
If the channel's output half has not been configured for data communications, then the field tx_status will contain the value kSMDCTxStatusSilent, otherwise it indicates the output half status. Note that it is not normally appropriate to distinguish between kSMDCTxStatusSendingCarrier and kSMDCTxStatusSendingData since protocols can typically switch between them very quickly and the system only reports approximately to avoid the status changing very rapidly.
The overall channel status is reported in link_status. Where the input half and output half have been configured with independent protocols, the status is reported as kSMDCLinkStatusConnected if either is connected. The status kSMDCLinkStatusNotConnected is reported only if both have finished data communications.
See also the document Prosody Data Communcations Protocols and Encodings for details of behaviour specific to individual protocols and encodings.
ERR_SM_WRONG_CHANNEL_STATE
.
0 if call completed successfully, otherwise a standard error such as:
This function is part of the Prosody data communications API.