op_radio_txch_rxch_add()
Note: Requires Wireless functionality
Abstract
Adds the specified receiver channel to the receiver group of the specified transmitter channel.
Syntax
op_radio_txch_rxch_add (txch_objid, rxch_objid)
| Argument | Type | Description |
|---|---|---|
txch_objid |
Objid |
the object ID of the transmitter channel to whose receiver group the receiver channel rxch_objid is to be added, or OPC_OBJID_UNIVERSAL to add to all transmitter channels. |
rxch_objid |
Objid |
the object ID of the receiver channel to be added to the receiver group of the transmitter channel txch_objid. |
Return Type
Compcode
Completion code indicating success or failure in adding the receiver channel. The procedure returns OPC_COMPCODE_SUCCESS if the receiver channel was successfully added to the group. Otherwise, it returns OPC_COMPCODE_FAILURE.
Example
/* Make sure own receiver channel is included in group */
Objid proc_id, comp_id, xmit_id, xmit_ch_id, rcvr_id, rcvr_ch_id;
proc_id = op_id_self ();
xmit_id = op_topo_assoc (proc_id, OPC_TOPO_ASSOC_OUT, OPC_OBJTYPE_RATX, 0);
comp_id = op_topo_child (xmit_id, OPC_OBJTYPE_COMP, 0);
xmit_ch_id = op_topo_child (comp_id, OPC_OBJTYPE_RATXCH, 0);
rcvr_id = op_topo_assoc (proc_id, OPC_TOPO_ASSOC_IN, OPC_OBJTYPE_RARX, 0);
comp_id = op_topo_child (rcvr_id, OPC_OBJTYPE_COMP, 0);
rcvr_ch_id = op_topo_child (comp_id, OPC_OBJTYPE_RARXCH, 0);
op_radio_txch_rxch_add (xmit_ch_id, rcvr_ch_id);
Details
The application generates a diagnostic error if the channel is already in the receiver group.
Purpose
Provides a mechanism to add one receiver channel to a transmitter channel’s receiver group.
Errors
- Recoverable Error: Object ID (
<objid>) does not correspond to a transmitter channel. - Recoverable Error: Transmitter object ID (
<objid>) refers to a restricted object. - Recoverable Error: Object ID (
<objid>) does not correspond to a receiver channel. - Recoverable Error: Receiver object ID (
<objid>) refers to a restricted object. - Recoverable Error: Internal memory allocation error, receiver group unchanged.
- Diagnostic Error: Attempt to add receiver channel (
<objid>) to receiver group of transmitter channel (<objid>), receiver already present.
Reference
- Use the KP op_radio_txch_rxgroup_get() to obtain the current receiver group
- Use the KP op_radio_txch_rxgroup_set() to set the receiver group to a provided array of object IDs
- Use the KP op_radio_txch_rxgroup_compute() to compute the receiver group using a filter
- Use the KP op_radio_txch_rxch_remove() to remove one receiver channel from a transmitter channel’s group