op_radio_txch_rxgroup_set()
Note: Requires Wireless functionality
Abstract
Sets the receiver group of a transmitter channel to a specified array of object IDs.
Syntax
op_radio_txch_rxgroup_set (txch_objid, count, rxgroup)
| Argument | Type | Description |
|---|---|---|
txch_objid |
Objid |
transmitter channel to which receiver group is assigned |
count |
unsigned int |
number of elements in rxgroup array |
rxgroup |
Objid * |
array of receiver channel object IDs |
Return Type
Compcode
Completion code indicating success or failure in setting the receiver group. The procedure returns OPC_COMPCODE_SUCCESS if the receiver group was successfully set. Otherwise, it returns OPC_COMPCODE_FAILURE.
Example
Objid receiver;
Objid receiver_array [2];
/* empty a receiver group */
op_radio_txch_rxgroup_set (txch, 0, OPC_NIL);
/* set the receiver group to one specific receiver */
receiver = ...;
op_radio_txch_rxgroup_set (txch2, 1, &receiver);
/* set the receiver group to a pair of receivers */
receiver_array [0] = ...;
receiver_array [1] = ...;
op_radio_txch_rxgroup_set (txch3, 2, receiver_array);
Details
This kernel procedure replaces the current receiver group of a transmitter channel with the set indicated by rxgroup; if count is 0, the current receiver group is emptied.
If rxgroup contains duplicate channel IDs, the application eliminates them and generates a diagnostic error.
Purpose
Provides a mechanism to set the receiver group of a transmitter channel based on an array of object IDs.
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: Internal memory allocation error, receiver group unchanged.
- Diagnostic Error: Duplicate Object ID (
<objid>) in receiver group set
Reference
- Use the KP op_radio_txch_rxgroup_compute() to compute the receiver group using a filter
- Use the KP op_radio_txch_rxgroup_get() to obtain the current receiver group
- Use the KP op_radio_txch_rxch_add() to add one receiver channel to a transmitter channel’s group
- Use the KP op_radio_txch_rxch_remove() to remove one receiver channel from a transmitter channel’s group