The VAN component is a hardware driver component. The Windows version of the VAN component supports the series of NSI boards. The drivers for the board must be correctly
installed and the programming library NSIVAN.dll must reside in the search path so that it can be found by the operating system when the VAN component is being loaded. Since
the VAN bus is very similar to the CAN bus efforts have been made to keep this component as compatible as possible to the CAN component.
Special Features
-
The bit layout of the AIDA_bDataFlags member in an AIDA event is as follows:
0x10 |
MSGFLAG_IFR |
An IFR reply message has been received. |
0x20 |
MSGFLAG_ACK |
Set Acknowledge Request in transmit data events |
0x40 |
MSGFLAG_TX |
When set in receive data events the received event is a transfer acknowledge event. |
- When the destination id of an AIDA event (stDstID) is set valid an IFR request is generated with this ID. When the source ID is also set valid then the data
of that event is transmitted first with this ID. The IFR request is always generated with the maximum possible DLC of 28 bytes.
Limitations
- Due to limitations of the NSI programming model stDstID and stSrcID
must not match the value of AcceptanceCode.
- The current release of the VAN component cannot define IFR objects in the VAN controller.
- Deferred reply transmissions are not supported in the current release.
Parameters
-
ChannelMask
-
Specifies the channel(s) to be used. Bit 0 corresponds to channel 0, bit 1 to channel 1 etc. The VAN component supports only one open channel at a time.
When more than one bit is set the VAN component selects the least significant bit and its corresponding channel. Currently a channel cannot be shared between different stacks.
-
Bitrate
-
The bitrate to be used on the selected channels. The bitrates supported by the NSI library are passed in the value list of this parameter
(pstParamValList). When setting this parameter to an unsupported value the actual bitrate will be set to the next
lower value supported by the NSI library.
-
ModuleType
-
Set to 0 to use the VAN board in slave mode and to 1 to use the VAN board in master mode.
-
CodingType
-
Set to 0 to use manchester coding and to 1 to use pulsed coding.
-
Retries
-
Sets the number of transmission retries.
-
AcceptanceCode, AcceptanceMask
-
Settings of the acceptance filter. Messages are accepted when (<Source ID> XOR AcceptanceCode) AND AcceptanceMask == 0
(see vector CanLib documentation for details). Please note the following differences compared to the CAN component:
- Identifiers (stSrcID) are always 12 bit wide.
- Due to limitations of the NSI programming model the acceptance filter cannot be changed while the AIDA stack is online.
-
SendID
-
The message identifier to be used in transmit data events when neither stSrcID nor stDstID is valid.
SendID can be overridden by setting bFlags in the event structure to AIDA_nSrcIDValid and setting up the event's
stSrcID.
-
MessageFlags
-
Contains a default value for special VAN flags to be set in transmit data events (see header file bsk_aida_van.h for details). A valid
AIDA_bDataFlags member in a transmit data event takes precedence over the value of this parameter.
Currently only MSGFLAG_IFR (0x10) and MSGFLAG_ACK (0x20) are supported. All other bits shall be set to 0 to guarantee compatibility with future releases of the VAN component.
-
OutPort
-
VANPC EXPERT, first channel only: This parameter sets the level of the logical outputs according to the given value. Only the four less significant bits are evaluated by the NSI VAN driver.
-
InPort
-
VANPC EXPERT, first channel only: This parameter reflects the level of the logical inputs according to the given value. The VANPC EXPERT boards have four input lines, the VANPCMCIA EXPERT
boards have one input line. Whenever the parameter is requested (AIDA_pstGetStackParam() with xsName set to NULL
or to "InPort") the the value is read before the parameter is returned.
See Also
AIDA Overview, list of AIDA components