
The SETCAN command enables a skript to easily change attributes of CAN arrays without having to fiddle around with array-indexing and bit operations. SETCAN needs three arguments. The first one is the array name, the second one tells SETCAN what to do, and the last one is the new value that SETCAN should write into the CAN array.
Here's a list of actions (second argument of SETCAN) that SETCAN can perform:
1 Set the message ID
2 Set the frame type (0 is standard, 1 is extended frame)
3 Set the RTR bit. (0 is OFF, 1 in ON)
4 Set the number of data bytes (0...8)
5 Set the RTC (seconds) time stamp
6 Set the millisecond time stamp
7 Set the random 32 bit header value
Please see the PUTCAN page for description of the layout of CAN arrays.
Please see the PUTCAN page. The PUTCAN example also demonstrates SETCAN calls.
If everythings gone right, SETCAN sets LASTERR to ERR_OK (0). Otherwise, if an argument is out of range, LASTERR will become ERR_REJECTED (4)