C2xConfigureChannel
CAPL Functions » Car2x » C2xConfigureChannel Valid for: CANoe DEFunction Syntax
Description
Configure a hardware channel. This method allows to redefine some or all channel parameters on the fly, i.e. for all following activities on a specific VN4610 channel those new settings will be used. In fact, the method overwrites the corresponding internal configuration settings provided by the setup-dialog.- To redefine just a subset of the channel parameters, a value of
<-1>can be used for most entries other than both txPower-parameters; for those two, the value<-100>can be used for this purpose. - To set just a subset of the parameters, the value
<-1>can be used for antenna, dataRate, and expiry to leave the corresponding parameters of the configuration unchanged.
- This method can only be used with VN4610 hardware.
- This method reconfigures the device internally and blocks regular operation for a couple of 10msec, so packets might be lost.
Parameters
- appChannel: Channel to apply settings to (1 .. n), n = available hardware channels (1=Ath1, 2=Ath2,…)
- radioChannel: Used radio channel (172, 174, 175, 176, 178, 180, 181, 182, 184)
- txPower: Default transmission power in dBm for ACK / CTS-messages, if not using individual transmission power setting by C2xOutputPacket; use “-100” to keep the original setting.
- maxTxPower: Maximum transmission power which will not be exceeded even if requested by txPower setting or OutputPacket. Use “-100” to keep the original setting.
- layout: 0: LPD, 1: EPD protocol
- dataRate: Data rate [Mbps] to be used (use “4” to set 4.5Mbps); Allowed values: 3,4,6,9,12,18,24,27; -1: keep the original setting
- bandwidth: Used channel bandwidth (10: 10 MHz; 20: 20Mhz)
-
txAntenna: Antenna used for Tx:
- 1: Ant1
- 2: Ant2
- 3: both
- -1: keep the original setting
-
rxAntenna: Antenna used for Rx:
- 1: Ant1
- 2: Ant2
- 3: both
- -1: keep the original setting
Return Values
0 or error code according to the following:- -1: channel not open for access
- -2: invalid channel number
- -3: failure on reading current setting from hardware
- -4: setting configuration parameters on hardware failed
- -5: invalid radioChannel
- -6: invalid txAntenna selection
- -7: invalid txAntenna selection
- -8: invalid bandwidth
- -9: invalid dataRate
- -10: invalid txPower
- -11: invalid maxTxPower
- 11: function call not allowed in this context like calling from measurement setup