Prosody data communications Protocols: CW tx

CW is 'continuous wave' which is a method of transmitting data using a tone. Binary data is encoded by sending either silence or a tone. A tone represents a space (zero) bit, while silence represents a mark (one) bit. The name continuous wave comes from the world of radio communications. It may seem strange that a signalling system that starts and stops a tone can be called continuous but the name was introduced when radio communications was moving from the spark transmitters (which produce a burst of broad spectrum radio noise) to transmitters using oscillators and which therefore could transmit a continuous carrier at a single frequency - hence the name.

This protocol implements the transmitter for CW. Since it is only a transmitter, it only uses the output half of a channel. Typically the input half is configured for CW rx.

API function behaviour

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

smdc_channel_config()

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

The protocol value is kSMDCProtocolCWtx.

The config_data pointer must point to one of these structs:

	typedef struct smdc_cw_config_parms {
		unsigned long speed;
		float space_frequency;
		unsigned long rx_carrier_off_mS;
		unsigned long set_power;
		float user_power;
	} SMDC_CW_CONFIG_PARMS;

'speed' is the data rate in bits per second.

'space_frequency' is the frequency, in Hz, of the tone used to encode space ('0') bits.

'rx_carrier_off_mS' is not used and applies only to CW reception.

'set_power' indicates whether to use the default power for transmissions (when zero) or to use a user-specified power level (non-zero). The user-specified power level is given in the user_power field.

'user_power' is the power level (in dBm0) to use for transmissions. This field must be zero if the set_power field is zero to indicate that the default should be used..

This protocol can use these encodings: SYNC, ASYNC, and HDLC. Note that since a CW signal contains no clock information, if SYNC or HDLC encodings are used the data must contain enough transitions between carrier and silence (i.e. no long runs of only zeros or only ones) to allow the receiver to keep locked onto the bit rate. It is the user's responsibility to determine the capabilities of the receiver and to ensure that sufficient transitions occur in the data.

The firmware modules cwtx and outchan must have been downloaded.

smdc_line_control()

[note] No control is implemented as this protocol has no initial handshake and has no concept of a carrier which can be on or off while not sending data.

The kSMDCLineCtlCmdSetPrefixSuffix command is supported by this protocol.

smdc_line_status()

smdc_tx_status()

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

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()