Documentation
¶
Overview ¶
Package canopen is the shared core of go-canopen, a CANopen (CiA 301) implementation on top of go-canbus: node identifiers, COB-IDs and the predefined connection set, the CANopen data types and their encoding, SDO abort codes and the NMT states and commands.
The services live in subpackages and all run on a canbus.Bus, so they work on every go-canbus transport (Linux SocketCAN, slcan adapters, the virtual bus):
- od: the object dictionary, with access rules, limits and hooks
- sdo: SDO client and server (expedited, segmented and block transfer)
- nmt: NMT master commands, the NMT slave state machine, heartbeat producer and consumer, node guarding
- pdo: PDO mapping, transmit and receive PDOs
- sync, emcy, timestamp: the SYNC, EMCY and TIME objects
- node: a complete CANopen device built from an object dictionary
- master: a network manager (NMT, heartbeat supervision, SDO clients, network scan, configuration from a DCF, remote PDOs)
- eds: EDS and DCF (CiA 306) reader, validator and writer
- codegen: typed Go code from an EDS
- cia402: the CiA 402 drive profile (state machine, modes of operation)
- dissect: decoding of CAN frames as CANopen messages
Index ¶
- Constants
- Variables
- func Classify(id canbus.ID) (s Service, node NodeID, pdo int)
- func Decode(t DataType, b []byte) (any, error)
- func DecodeInt(b []byte) int64
- func DecodeUint(b []byte) uint64
- func DefaultRPDO(n int, id NodeID) canbus.ID
- func DefaultTPDO(n int, id NodeID) canbus.ID
- func Encode(t DataType, v any) ([]byte, error)
- func EncodeInt(t DataType, i int64, u uint64, neg bool) ([]byte, error)
- func FormatValue(t DataType, b []byte) string
- func ParseInt(s string, bits int) (int64, error)
- func ParseUint(s string, bits int) (uint64, error)
- func ParseValue(t DataType, s string, node NodeID) ([]byte, error)
- type AbortCode
- type AbortError
- type Bus
- type COBID
- type DataType
- type NMTCommand
- type NMTState
- type NodeID
- type Service
Constants ¶
const ( FuncNMT canbus.ID = 0x000 // NMT module control (no node-ID) FuncSYNC canbus.ID = 0x080 // SYNC (no node-ID) FuncEMCY canbus.ID = 0x080 // EMCY, + node-ID FuncTIME canbus.ID = 0x100 // TIME stamp (no node-ID) FuncTPDO1 canbus.ID = 0x180 FuncRPDO1 canbus.ID = 0x200 FuncTPDO2 canbus.ID = 0x280 FuncRPDO2 canbus.ID = 0x300 FuncTPDO3 canbus.ID = 0x380 FuncRPDO3 canbus.ID = 0x400 FuncTPDO4 canbus.ID = 0x480 FuncRPDO4 canbus.ID = 0x500 FuncSDOTx canbus.ID = 0x580 // SDO server to client, + node-ID FuncSDORx canbus.ID = 0x600 // SDO client to server, + node-ID FuncHeartbeat canbus.ID = 0x700 // NMT error control (boot-up, heartbeat, guarding), + node-ID LSSMasterID canbus.ID = 0x7E5 // LSS master to slaves (CiA 305) LSSSlaveID canbus.ID = 0x7E4 // LSS slave to master (CiA 305) )
Function codes of the predefined connection set (CiA 301 7.3.5): the CAN identifier of a node's default COB is the function code plus the node-ID.
Variables ¶
var ( // ErrInvalidNodeID reports a node-ID outside 1..127. ErrInvalidNodeID = errors.New("canopen: invalid node-ID") // ErrTimeout reports a protocol timeout (an SDO response, a heartbeat, // a boot-up message that did not arrive in time). A context deadline is // reported as the context's error instead. ErrTimeout = errors.New("canopen: timeout") // ErrClosed reports an operation on a closed service. ErrClosed = errors.New("canopen: closed") // ErrDataType reports a value that does not fit its CANopen data type. ErrDataType = errors.New("canopen: data type mismatch") // ErrProtocol reports a message that violates the protocol (an // unexpected SDO command specifier, a wrong toggle bit, a short frame). ErrProtocol = errors.New("canopen: protocol error") // ErrBusy reports a service that is already running a transfer. ErrBusy = errors.New("canopen: busy") )
Sentinel errors. They are usually wrapped with detail; test with errors.Is. SDO aborts are AbortCode values (errors.As).
Functions ¶
func Classify ¶
Classify maps an 11-bit CAN identifier to its service in the predefined connection set, the node-ID it carries (0 for NMT, SYNC, TIME and LSS) and, for PDOs, the PDO number 1..4. Devices may move any COB to another identifier, so the answer is the default interpretation only.
func Decode ¶
Decode converts the bus encoding of t to a Go value: bool for BOOLEAN, int64 for signed and uint64 for unsigned integers of every width, float32/float64 for REAL32/REAL64, string for VISIBLE_STRING and UNICODE_STRING, []byte for everything else.
func DecodeUint ¶
DecodeUint decodes a little-endian unsigned integer of 1..8 bytes.
func DefaultRPDO ¶
DefaultRPDO returns the default CAN identifier of RPDO n (1..4) of a node; 0 when n is out of range.
func DefaultTPDO ¶
DefaultTPDO returns the default CAN identifier of TPDO n (1..4) of a node; 0 when n is out of range.
func Encode ¶
Encode converts a Go value to the bus encoding of t. Integers accept any Go integer type (range-checked), floats float32/float64, BOOLEAN bool or an integer 0/1, strings string, OCTET_STRING and DOMAIN []byte or a string. A []byte is accepted for every type when its length matches.
func EncodeInt ¶
EncodeInt encodes an integer of type t, with a range check. neg tells whether the value is negative (then i holds it); otherwise u holds it.
func FormatValue ¶
FormatValue formats an encoded value of type t for display: decimal for signed integers and floats, 0x hexadecimal for unsigned integers, the text for strings, hexadecimal bytes otherwise.
func ParseInt ¶
ParseInt parses a signed integer literal (decimal, 0x hexadecimal, or octal with a leading 0; an optional sign). A hexadecimal literal may also give the two's complement pattern of a negative value, as EDS tools write them ("0xFFFFFFFF" for an INTEGER32 -1).
func ParseUint ¶
ParseUint parses an unsigned integer literal as EDS files write them: decimal, hexadecimal with 0x, or octal with a leading 0 (CiA 306 4.6.3).
func ParseValue ¶
ParseValue parses a value literal of type t as EDS and DCF files write them (CiA 306): integers in decimal, 0x hexadecimal or octal, optionally with $NODEID added ("$NODEID+0x180", "0x180+$NODEID"), which evaluates to node; floats in decimal notation; VISIBLE_STRING as the text itself; OCTET_STRING and DOMAIN as hexadecimal digit pairs (spaces allowed); UNICODE_STRING as text. An empty literal of an integer or float type is zero.
Types ¶
type AbortCode ¶
type AbortCode uint32
AbortCode is an SDO abort code (CiA 301 7.2.4.3.17). It is also the error type the object dictionary returns for refused accesses, so that an SDO server can pass the reason on unchanged. Test with errors.As.
const ( AbortToggle AbortCode = 0x05030000 // toggle bit not alternated AbortTimeout AbortCode = 0x05040000 // SDO protocol timed out AbortCommand AbortCode = 0x05040001 // command specifier not valid or unknown AbortBlockSize AbortCode = 0x05040002 // invalid block size (block mode) AbortSequence AbortCode = 0x05040003 // invalid sequence number (block mode) AbortCRC AbortCode = 0x05040004 // CRC error (block mode) AbortOutOfMemory AbortCode = 0x05040005 // out of memory AbortUnsupported AbortCode = 0x06010000 // unsupported access to an object AbortWriteOnly AbortCode = 0x06010001 // attempt to read a write-only object AbortReadOnly AbortCode = 0x06010002 // attempt to write a read-only object AbortNoObject AbortCode = 0x06020000 // object does not exist AbortNotMappable AbortCode = 0x06040041 // object cannot be mapped to the PDO AbortPDOLength AbortCode = 0x06040042 // mapped objects exceed the PDO length AbortParamIncompatible AbortCode = 0x06040043 // general parameter incompatibility AbortInternal AbortCode = 0x06040047 // general internal incompatibility in the device AbortHardware AbortCode = 0x06060000 // access failed due to a hardware error AbortLength AbortCode = 0x06070010 // data type or length does not match AbortLengthHigh AbortCode = 0x06070012 // length of service parameter too high AbortLengthLow AbortCode = 0x06070013 // length of service parameter too low AbortNoSubIndex AbortCode = 0x06090011 // sub-index does not exist AbortInvalidValue AbortCode = 0x06090030 // invalid value for parameter AbortValueHigh AbortCode = 0x06090031 // value written too high AbortValueLow AbortCode = 0x06090032 // value written too low AbortMaxLessMin AbortCode = 0x06090036 // maximum value is less than minimum value AbortNoResource AbortCode = 0x060A0023 // resource not available: SDO connection AbortGeneral AbortCode = 0x08000000 // general error AbortTransfer AbortCode = 0x08000020 // data cannot be transferred or stored AbortLocalControl AbortCode = 0x08000021 // ... because of local control AbortDeviceState AbortCode = 0x08000022 // ... because of the present device state AbortNoDictionary AbortCode = 0x08000023 // no object dictionary present AbortNoData AbortCode = 0x08000024 // no data available )
SDO abort codes.
type AbortError ¶
type AbortError struct {
Code AbortCode
Index uint16
SubIndex uint8
// Remote is true when the peer sent the abort, false when this side
// aborted the transfer.
Remote bool
}
AbortError is an SDO abort with the object it concerns, as reported by the SDO client. It unwraps to its AbortCode.
type Bus ¶
type Bus interface {
Send(ctx context.Context, f *canbus.Frame) error
Subscribe(opts ...canbus.SubscribeOption) (*canbus.Subscription, error)
}
Bus is what the CANopen services need from the CAN layer: sending frames and subscribing to received ones. *canbus.Bus implements it, on every go-canbus transport. A node does not receive its own transmissions (as on a real bus), so two services that talk to each other in one process need two buses (two ports of a virtual bus, or two SocketCAN sockets).
type COBID ¶
type COBID uint32
COBID is the value of a COB-ID object (0x1005, 0x1014, 0x1200 sub 1/2, 0x1400 and 0x1800 sub 1, ...): the CAN identifier in bits 0..28 and flag bits above it.
const ( // COBInvalid (bit 31) disables the object: a PDO or EMCY that does not // exist or is not valid, an SDO channel that is not used. COBInvalid COBID = 1 << 31 // COBNoRTR (bit 30) of a PDO COB-ID: no remote transmission request // allowed. Of the SYNC COB-ID (0x1005) this bit is "generate": the // device is the SYNC producer. COBNoRTR COBID = 1 << 30 // COBGenerate is bit 30 of the SYNC (0x1005) and TIME (0x1012) COB-IDs: // the device produces the object. COBGenerate COBID = 1 << 30 // COBConsume is bit 31 of the TIME COB-ID (0x1012): the device consumes // TIME stamps. (For SYNC, bit 31 has no meaning.) COBConsume COBID = 1 << 31 // COBExtended (bit 29) selects a 29-bit CAN identifier. COBExtended COBID = 1 << 29 )
COB-ID flag bits (CiA 301 7.5.2).
func NewCOBID ¶
NewCOBID returns the COB-ID of a CAN identifier (extended when id does not fit in 11 bits).
func (COBID) Matches ¶
Matches reports whether the frame carries this COB-ID's identifier in the same format.
type DataType ¶
type DataType uint16
DataType is a CANopen data type index (CiA 301 7.4.7.1, the objects at 0x0001..0x0025 of the object dictionary).
const ( Boolean DataType = 0x0001 Integer8 DataType = 0x0002 Integer16 DataType = 0x0003 Integer32 DataType = 0x0004 Unsigned8 DataType = 0x0005 Unsigned16 DataType = 0x0006 Unsigned32 DataType = 0x0007 Real32 DataType = 0x0008 VisibleString DataType = 0x0009 OctetString DataType = 0x000A UnicodeString DataType = 0x000B TimeOfDay DataType = 0x000C TimeDifference DataType = 0x000D Domain DataType = 0x000F Integer24 DataType = 0x0010 Real64 DataType = 0x0011 Integer40 DataType = 0x0012 Integer48 DataType = 0x0013 Integer56 DataType = 0x0014 Integer64 DataType = 0x0015 Unsigned24 DataType = 0x0016 Unsigned40 DataType = 0x0018 Unsigned48 DataType = 0x0019 Unsigned56 DataType = 0x001A Unsigned64 DataType = 0x001B // Complex (structured) types of the communication profile. PDOCommParam DataType = 0x0020 PDOMapping DataType = 0x0021 SDOParam DataType = 0x0022 Identity DataType = 0x0023 )
Static data types. Multi-byte values are little-endian on the bus.
func ParseDataType ¶
ParseDataType parses a CiA 301 type name ("UNSIGNED32") or a type index ("0x0007").
func (DataType) Bits ¶
Bits returns the size in bits of a value of the type in a PDO: 1 for BOOLEAN (CiA 301 encodes it as one bit), 8 times Size otherwise, 0 for variable-length types.
func (DataType) IsInteger ¶
IsInteger reports whether t is a signed or unsigned integer type (not BOOLEAN).
func (DataType) IsVariable ¶
IsVariable reports whether values of t have no fixed size (VISIBLE_STRING, OCTET_STRING, UNICODE_STRING, DOMAIN).
type NMTCommand ¶
type NMTCommand uint8
NMTCommand is the command specifier of an NMT module control message (CAN-ID 0x000: command, node-ID).
const ( NMTStart NMTCommand = 0x01 // enter operational NMTStop NMTCommand = 0x02 // enter stopped NMTEnterPreOperational NMTCommand = 0x80 NMTResetNode NMTCommand = 0x81 // reset application NMTResetCommunication NMTCommand = 0x82 )
NMT commands.
func ParseNMTCommand ¶
func ParseNMTCommand(s string) (NMTCommand, error)
ParseNMTCommand parses a command name as String returns it.
func (NMTCommand) Valid ¶
func (c NMTCommand) Valid() bool
Valid reports whether c is one of the five NMT commands.
type NMTState ¶
type NMTState uint8
NMTState is a node's NMT state as it reports it in heartbeat and node guarding messages (CiA 301 7.2.8.3.2). Boot-up is reported as StateInitialising (0x00).
const ( StateInitialising NMTState = 0x00 StateStopped NMTState = 0x04 StateOperational NMTState = 0x05 StatePreOperational NMTState = 0x7F // StateUnknown is no state a node reports: a consumer's state before // it has heard from the node, or after a heartbeat timeout. StateUnknown NMTState = 0xFF )
NMT states.
func ParseNMTState ¶
ParseNMTState parses a state name as String returns it.
type NodeID ¶
type NodeID uint8
NodeID is a CANopen node-ID: 1..127. 0 addresses all nodes in NMT commands and is not a valid node-ID otherwise.
const ( BroadcastNodeID NodeID = 0 // all nodes, in NMT commands only MinNodeID NodeID = 1 // lowest valid node-ID MaxNodeID NodeID = 127 // highest valid node-ID )
Node-ID limits.
type Service ¶
type Service uint8
Service is the CANopen service a CAN identifier belongs to in the predefined connection set.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package cdcf is the concise DCF of CiA 302-3: the binary form of a node configuration that a CANopen manager keeps in its object 0x1F22 (one DOMAIN sub-object per node) and writes to the node at boot-up.
|
Package cdcf is the concise DCF of CiA 302-3: the binary form of a node configuration that a CANopen manager keeps in its object 0x1F22 (one DOMAIN sub-object per node) and writes to the node at boot-up. |
|
Package cia402 implements the CiA 402 drive profile (IEC 61800-7-201): the power drive state machine, the modes of operation and the common 0x6xxx objects, a device-side drive model and a master-side controller.
|
Package cia402 implements the CiA 402 drive profile (IEC 61800-7-201): the power drive state machine, the modes of operation and the common 0x6xxx objects, a device-side drive model and a master-side controller. |
|
Package codegen generates typed Go code from an EDS or DCF (eds.File): index and sub-index constants for every object, a NewDictionary function that builds the object dictionary without parsing anything at run time, a typed local accessor over an od.Dictionary and a typed remote accessor over an SDO client.
|
Package codegen generates typed Go code from an EDS or DCF (eds.File): index and sub-index constants for every object, a NewDictionary function that builds the object dictionary without parsing anything at run time, a typed local accessor over an od.Dictionary and a typed remote accessor over an SDO client. |
|
Package dissect interprets CAN frames as CANopen messages by the predefined connection set (CiA 301 7.3.5, canopen.Classify): NMT, SYNC, TIME, EMCY, PDOs, SDO requests and responses, NMT error control (heartbeat, boot-up, node guarding) and LSS (CiA 305).
|
Package dissect interprets CAN frames as CANopen messages by the predefined connection set (CiA 301 7.3.5, canopen.Classify): NMT, SYNC, TIME, EMCY, PDOs, SDO requests and responses, NMT error control (heartbeat, boot-up, node guarding) and LSS (CiA 305). |
|
Package e2e holds the end-to-end tests of go-canopen: a master and several nodes (I/O modules and a CiA 402 drive) running the whole stack (NMT, boot procedure, SDO, PDO, SYNC, heartbeat, EMCY, resets) over the virtual bus, and on Linux also over SocketCAN (vcan0, or the interface CANOPEN_TEST_IFACE names).
|
Package e2e holds the end-to-end tests of go-canopen: a master and several nodes (I/O modules and a CiA 402 drive) running the whole stack (NMT, boot procedure, SDO, PDO, SYNC, heartbeat, EMCY, resets) over the virtual bus, and on Linux also over SocketCAN (vcan0, or the interface CANOPEN_TEST_IFACE names). |
|
Package eds reads, validates and writes CANopen electronic data sheets (EDS) and device configuration files (DCF) as CiA 306-1 specifies them, and converts them to and from an od.Dictionary.
|
Package eds reads, validates and writes CANopen electronic data sheets (EDS) and device configuration files (DCF) as CiA 306-1 specifies them, and converts them to and from an od.Dictionary. |
|
Package emcy implements the CANopen emergency object (CiA 301 7.2.7).
|
Package emcy implements the CANopen emergency object (CiA 301 7.2.7). |
|
examples
|
|
|
canopen-fd
command
Command canopen-fd runs a CANopen FD network (CiA 1301) on a virtual CAN FD bus: a master and a device in FD mode.
|
Command canopen-fd runs a CANopen FD network (CiA 1301) on a virtual CAN FD bus: a master and a device in FD mode. |
|
cia402-drive
command
Command cia402-drive runs a simulated CiA 402 drive as a CANopen node on a virtual CAN bus and operates it from a master over SDO: enable (walking the state machine), profile position moves, a fault with its emergency message, fault reset, and disable.
|
Command cia402-drive runs a simulated CiA 402 drive as a CANopen node on a virtual CAN bus and operates it from a master over SDO: enable (walking the state machine), profile position moves, a fault with its emergency message, fault reset, and disable. |
|
eds-dictionary
command
Command eds-dictionary builds a CANopen device from an EDS (a CiA 401 I/O module), runs it on a virtual CAN bus, configures it from a DCF with the master, and exports its configuration as a DCF again.
|
Command eds-dictionary builds a CANopen device from an EDS (a CiA 401 I/O module), runs it on a virtual CAN bus, configures it from a DCF with the master, and exports its configuration as a DCF again. |
|
lss-assign
command
Command lss-assign starts three CANopen devices without node-ID (LSS, CiA 305) on a virtual CAN bus.
|
Command lss-assign starts three CANopen devices without node-ID (LSS, CiA 305) on a virtual CAN bus. |
|
network-boot
command
Command network-boot runs the CiA 302-2 network boot-up on a virtual CAN bus: a CANopen manager (master.WithDictionary) whose dictionary lists two slaves in 0x1F81 with their expected identity, a concise DCF each (0x1F22) and heartbeat supervision (0x1016).
|
Command network-boot runs the CiA 302-2 network boot-up on a virtual CAN bus: a CANopen manager (master.WithDictionary) whose dictionary lists two slaves in 0x1F81 with their expected identity, a concise DCF each (0x1F22) and heartbeat supervision (0x1016). |
|
node-master
command
Command node-master runs a CANopen device and a network manager on a virtual CAN bus: the master waits for the boot-up, reads the device's identity by SDO, maps a TPDO and an RPDO, starts the node and exchanges process data with it.
|
Command node-master runs a CANopen device and a network manager on a virtual CAN bus: the master waits for the boot-up, reads the device's identity by SDO, maps a TPDO and an RPDO, starts the node and exchanges process data with it. |
|
sdo-block
command
Command sdo-block transfers a 64 KiB DOMAIN to and from a CANopen node with SDO block transfer (CRC-checked) on a virtual CAN bus, and compares it with segmented transfer.
|
Command sdo-block transfers a 64 KiB DOMAIN to and from a CANopen node with SDO block transfer (CRC-checked) on a virtual CAN bus, and compares it with segmented transfer. |
|
socketcan-node
command
Command socketcan-node runs a CANopen device on a Linux SocketCAN interface (a real adapter, or vcan for experiments) until interrupted: boot-up, heartbeat, SDO server, EMCY and four TPDOs/RPDOs, with a counter mapped into TPDO 1 by default (send NMT start to see it).
|
Command socketcan-node runs a CANopen device on a Linux SocketCAN interface (a real adapter, or vcan for experiments) until interrupted: boot-up, heartbeat, SDO server, EMCY and four TPDOs/RPDOs, with a counter mapped into TPDO 1 by default (send NMT start to see it). |
|
internal
|
|
|
cmd/gengolden
command
Command gengolden regenerates the code generator's golden output, internal/golden/*, from the EDS and DCF fixtures (go generate ./...).
|
Command gengolden regenerates the code generator's golden output, internal/golden/*, from the EDS and DCF fixtures (go generate ./...). |
|
golden/compact
Package compact is the object dictionary of Compact demo (OT Fabric), generated from compact.eds.
|
Package compact is the object dictionary of Compact demo (OT Fabric), generated from compact.eds. |
|
golden/drive402
Package drive402 is the object dictionary of Servo 402 (OT Fabric), generated from drive402.eds.
|
Package drive402 is the object dictionary of Servo 402 (OT Fabric), generated from drive402.eds. |
|
golden/ds301
Package ds301 is the object dictionary of New Product, generated from canopennode_ds301_profile.eds.
|
Package ds301 is the object dictionary of New Product, generated from canopennode_ds301_profile.eds. |
|
golden/io401
Package io401 is the object dictionary of IO-401 (OT Fabric), generated from io401.eds.
|
Package io401 is the object dictionary of IO-401 (OT Fabric), generated from io401.eds. |
|
golden/node37
Package node37 is the object dictionary of IO-401 (OT Fabric), generated from node37.dcf.
|
Package node37 is the object dictionary of IO-401 (OT Fabric), generated from node37.dcf. |
|
nettest
Package nettest provides what the network-level tests (node, master, e2e) share: a device dictionary with application objects, contexts, polling and a goroutine leak check.
|
Package nettest provides what the network-level tests (node, master, e2e) share: a device dictionary with application objects, contexts, polling and a goroutine leak check. |
|
testbus
Package testbus provides CAN buses for tests: ports of one virtual bus, and two virtual buses joined by a fault-injecting chaos bridge.
|
Package testbus provides CAN buses for tests: ports of one virtual bus, and two virtual buses joined by a fault-injecting chaos bridge. |
|
Package interop tests go-canopen against the independent CANopen stacks of the otfabric/canopen-interop images (CANopenNode, Lely CANopen, python canopen), through their container contract only:
|
Package interop tests go-canopen against the independent CANopen stacks of the otfabric/canopen-interop images (CANopenNode, Lely CANopen, python canopen), through their container contract only: |
|
Package lss implements the CANopen layer setting services (CiA 305): an LSS Master that inquires and configures the node-ID and the bit timing of devices identified by their 128-bit LSS address (the identity object 0x1018), and finds unconfigured devices with Fastscan; and an LSS Slave, the LSS state machine of a device.
|
Package lss implements the CANopen layer setting services (CiA 305): an LSS Master that inquires and configures the node-ID and the bit timing of devices identified by their 128-bit LSS address (the identity object 0x1018), and finds unconfigured devices with Fastscan; and an LSS Slave, the LSS state machine of a device. |
|
Package master is a CANopen network manager (an NMT master with the services a CiA 302 manager uses): NMT commands, heartbeat supervision, emergency reception, SDO clients for every node, network scan, node configuration (from entries or a DCF), a boot procedure, remote PDOs, SYNC and TIME production, CiA 402 drive control, an LSS master, MPDO configuration, CANopen FD (USDO) and the CiA 302 manager.
|
Package master is a CANopen network manager (an NMT master with the services a CiA 302 manager uses): NMT commands, heartbeat supervision, emergency reception, SDO clients for every node, network scan, node configuration (from entries or a DCF), a boot procedure, remote PDOs, SYNC and TIME production, CiA 402 drive control, an LSS master, MPDO configuration, CANopen FD (USDO) and the CiA 302 manager. |
|
Package mpdo implements CANopen multiplexed PDOs (MPDOs, CiA 301 7.2.2.4 and the object scanner and dispatcher lists 0x1FA0..0x1FFF): PDOs that carry one value of up to 4 bytes together with the object it belongs to, so that one COB-ID can transport many objects.
|
Package mpdo implements CANopen multiplexed PDOs (MPDOs, CiA 301 7.2.2.4 and the object scanner and dispatcher lists 0x1FA0..0x1FFF): PDOs that carry one value of up to 4 bytes together with the object it belongs to, so that one COB-ID can transport many objects. |
|
Package nmt implements CANopen network management (CiA 301 7.2.8 and 7.3.2): NMT module control and NMT error control.
|
Package nmt implements CANopen network management (CiA 301 7.2.8 and 7.3.2): NMT module control and NMT error control. |
|
Package node is a complete CANopen device (CiA 301) built from an object dictionary: New chooses the communication services from the objects the dictionary has, Node.Start starts them and sends the boot-up message, and the NMT state machine enables and disables them.
|
Package node is a complete CANopen device (CiA 301) built from an object dictionary: New chooses the communication services from the objects the dictionary has, Node.Start starts them and sends the boot-up message, and the NMT state machine enables and disables them. |
|
Package od is the CANopen object dictionary (CiA 301 7.4): objects addressed by a 16-bit index and an 8-bit sub-index, with data types, access rights, PDO mappability, default values and limits.
|
Package od is the CANopen object dictionary (CiA 301 7.4): objects addressed by a 16-bit index and an 8-bit sub-index, with data types, access rights, PDO mappability, default values and limits. |
|
Package pdo implements CANopen process data objects (CiA 301 7.2.2, 7.5.2.35..38): mapping entries and the bit-exact packing of mapped values, the transmit and receive PDOs of a device, and a master's tools to configure a node's PDOs over SDO and to decode and produce PDOs.
|
Package pdo implements CANopen process data objects (CiA 301 7.2.2, 7.5.2.35..38): mapping entries and the bit-exact packing of mapped values, the transmit and receive PDOs of a device, and a master's tools to configure a node's PDOs over SDO and to decode and produce PDOs. |
|
Package program is the program download of CiA 302-3 on the device side: the objects through which a CANopen manager replaces the application software of a device over SDO.
|
Package program is the program download of CiA 302-3 on the device side: the objects through which a CANopen manager replaces the application software of a device over SDO. |
|
Package sdo implements the CANopen service data object (CiA 301 7.2.4): a Client that reads (uploads) and writes (downloads) sub-objects of a remote object dictionary, and a Server that serves an od.Dictionary.
|
Package sdo implements the CANopen service data object (CiA 301 7.2.4): a Client that reads (uploads) and writes (downloads) sub-objects of a remote object dictionary, and a Server that serves an od.Dictionary. |
|
Package store keeps the parameters of a CANopen device across restarts: the persistence behind the store parameters (0x1010) and restore default parameters (0x1011) objects of CiA 301.
|
Package store keeps the parameters of a CANopen device across restarts: the persistence behind the store parameters (0x1010) and restore default parameters (0x1011) objects of CiA 301. |
|
Package syncobj implements the CANopen SYNC object (CiA 301 7.2.5).
|
Package syncobj implements the CANopen SYNC object (CiA 301 7.2.5). |
|
Package timestamp implements the CANopen TIME object (CiA 301 7.2.6) and the TIME_OF_DAY and TIME_DIFFERENCE data types (CiA 301 7.1.6.5).
|
Package timestamp implements the CANopen TIME object (CiA 301 7.2.6) and the TIME_OF_DAY and TIME_DIFFERENCE data types (CiA 301 7.1.6.5). |
|
Package usdo implements the universal service data object (USDO) of CANopen FD (CiA 1301), which replaces the SDO: a Client reads and writes the object dictionaries of [Server]s over CAN FD frames, to one node, to a group or to all nodes, with several transfers at once.
|
Package usdo implements the universal service data object (USDO) of CANopen FD (CiA 1301), which replaces the SDO: a Client reads and writes the object dictionaries of [Server]s over CAN FD frames, to one node, to a group or to all nodes, with several transfers at once. |