Prosody data communications Protocols: raw tx

This protocol implements a transmitter of uninterpreted digital data. Since it is only a transmitter, it only uses the output half of a channel. It is typically used either with HDLC encoding to implement a protocol such as V.120 or with SYNC encoding to put an arbitrary data stream on a timeslot. When used with HDLC the input half can be configured for raw rx with HDLC to provide a duplex link.

API function behaviour

This should be read in conjunction with the generic data communications documentation.

smdc_channel_config()

You must use #include "smdc_raw.h" to get the appropriate declarations.

The protocol value is kSMDCProtocolRawTx.

Only on Prosody version 1: There is no configuration for this protocol, so the config_data pointer should be null (0) and the config_length should be zero.

Only on Prosody version 2 (TiNG): The configuration for this protocol is optional, if not required the config_data pointer should be null (0) and the config_length should be zero. In this case the data will be sent unmodified at 64000 bits per second.

If required, the config_data pointer must point to one of these structs:

	typedef struct smdc_raw_config_parms {
		unsigned i460_mask;
		unsigned xorval;
	} SMDC_RAW_CONFIG_PARMS;

'i460_mask' indicates which data bits in the timeslot are to be used. This implements ITU I.460 2.1.2 flexible format multiplexing. For example, if the value is specified as 0x50, then bit 2 and bit 4 (as numbered in I.460) are used from each octet, giving 16000 bits per second. If the value zero is used, this indicates that all bits are to be used (the same as value 0xff).

'xorval' specifies a value to be exclusive-ored with each octet just before writing it to the timeslot.

This protocol can use these encodings: SYNC, ASYNC, and HDLC.

It can also be used with no encoding. For this protocol, this will transmit the octets unaltered, most significant bit first.

The firmware module datatx must have been downloaded.

smdc_line_control()

[note] not useful - no initial connection procedure and no RTS.

The kSMDCLineCtlCmdSetPrefixSuffix command is not supported by this protocol.

smdc_line_status()

[note] 'link_status' is not useful since it is always connected.

smdc_tx_status()

[note] 'flow' is not useful since there is no flow control mechanism.

'status' never reports empty.

smdc_tx_control()

The only notification implemented is kSMDCTxCtlNotifyOnCapacity.

When setting the capacity, it is necessary to specify a value one greater than the value required. i.e. to get notified when space is available for at least 32 bytes, set the capacity to 33 or greater.

smdc_rx_status()

This function is not applicable since it only applies to the input half of a channel.

smdc_rx_control()

This function is not applicable since it only applies to the input half of a channel.

smdc_rx_data()

This function is not applicable since it only applies to the input half of a channel.

smdc_tx_data()