To write a sensor node script, import the CAN_library as a library into your arduino IDE environment.
To use the original (silly) DUEM can protocol, use DUEM_can.h/cpp and follow the example in the example implementation.
Otherwise use the consts outlined in CAN consts and follow the example of motor_controller or of tempsensornode_mk2.