LssSlaveOptions Class¶
Layer setting services on a CanOpenNode (CiA 305). Absent options leave LSS off,
unless the device description says LSS_Supported. An explicit instance wins over the
file, including Enabledfalse.
Inheritance Object → LssSlaveOptions
Properties¶
LssSlaveOptions.BitRateSwitch Property¶
Called when activate bit timing copies the pending timing into the active one, with the bit rate in bits per second when the table names one. Runs off the node's actor. The open channel is not reconfigured: adapters generally cannot change rate while they are open, so the callback reopens the channel or records the rate. null (the default) only updates the slave's active table entry. Transmission resumes only after both the second switch delay and this task complete successfully, including for a zero delay. While the node is active, a failure is reported on its background exception event and keeps transmission suppressed until a later successful activation. Switch callbacks are serialized. The token requests cancellation asynchronously when another activation supersedes the switch or the node is disposed. A replacement callback starts only after the previous callback finishes, with a fresh token. The callback must cooperate with cancellation or provide its own timeout; a task that ignores the token cannot be forcibly stopped, and does not block disposal. Pending callbacks do not start after cancellation. The node never resumes transmission merely because a hook is slow.
public System.Func<int,System.Threading.CancellationToken,System.Threading.Tasks.Task>? BitRateSwitch { get; init; }
Property Value¶
Func<Int32,CancellationToken,Task>
LssSlaveOptions.BitTimingSupported Property¶
When false, configure bit timing and activate bit timing are ignored. Defaults to true.
Property Value¶
LssSlaveOptions.Enabled Property¶
When false, the node does not answer 7E5h and rejects an
unconfigured node-id. Defaults to true: passing an instance turns LSS on.
Property Value¶
LssSlaveOptions.Manufacturer Property¶
Handles a manufacturer-specific command (specifier 128..255, §7.3) while the slave is in configuration. The memory is the seven parameter bytes. Returns the response frame (at most 8 bytes; shorter frames are padded with zeros) or null to stay silent. null (the default) stays silent for every such command. Unlike BitRateSwitch, the handler runs on the node's actor: while it blocks, every other CANopen service of the node waits, so it must return promptly.
Property Value¶
Func<Byte,ReadOnlyMemory<Byte>,Byte[]>
LssSlaveOptions.ManufacturerRates Property¶
Bit rates of manufacturer tables 80h..FEh, keyed by table selector and
index. A configure command for a pair that is absent is answered as not supported.
Table 0 is not looked up here.
public System.Collections.Generic.IReadOnlyDictionary<(byte Selector,byte Index),int>? ManufacturerRates { get; init; }
Property Value¶
IReadOnlyDictionary<<Byte,Byte>,Int32>
LssSlaveOptions.NodeIdConfigurationSupported Property¶
When false, configure node-id is ignored and draws no response (§7.5.1 is then not implemented). Defaults to true.
Property Value¶
LssSlaveOptions.Store Property¶
Where a store command persists the pending node-id and bit timing. null (the default) answers store with StoreNotSupported: the service is recognized, and there is no medium.