Skip to content

TOYOPUC Computerlink .NET API Reference

This page is generated from the PlcComm.Toyopuc assembly public API and XML documentation comments.

Run python scripts/generate_api_reference.py --help from the repository root to regenerate it.

PlcComm.Toyopuc

ClockData

public sealed class ClockData

Members

ClockData
public ClockData(int Second, int Minute, int Hour, int Day, int Month, int Year2Digit, int Weekday)
AsDateTime
public DateTime AsDateTime(int yearBase)
Day
public int Day { get; init; }
Hour
public int Hour { get; init; }
Minute
public int Minute { get; init; }
Month
public int Month { get; init; }
Second
public int Second { get; init; }
Weekday
public int Weekday { get; init; }
Year2Digit
public int Year2Digit { get; init; }

CpuStatusData

public sealed class CpuStatusData

Members

CpuStatusData
public CpuStatusData(byte data1, byte data2, byte data3, byte data4, byte data5, byte data6, byte data7, byte data8)
RawHex
public string RawHex()
AbnormalWriteDuringRun
public bool AbnormalWriteDuringRun { get; }
AbnormalWriteEquipmentInfo
public bool AbnormalWriteEquipmentInfo { get; }
AbnormalWriteFlashRegister
public bool AbnormalWriteFlashRegister { get; }
AbnormalWritingEquipmentInfo
public bool AbnormalWritingEquipmentInfo { get; }
Alarm
public bool Alarm { get; }
Data1
public byte Data1 { get; }
Data2
public byte Data2 { get; }
Data3
public byte Data3 { get; }
Data4
public byte Data4 { get; }
Data5
public byte Data5 { get; }
Data6
public byte Data6 { get; }
Data7
public byte Data7 { get; }
Data8
public byte Data8 { get; }
DebugMode
public bool DebugMode { get; }
EnableDetected
public bool EnableDetected { get; }
FaintFailure
public bool FaintFailure { get; }
FatalFailure
public bool FatalFailure { get; }
IoAllocationParameterAltered
public bool IoAllocationParameterAltered { get; }
IoMonitorUserMode
public bool IoMonitorUserMode { get; }
IoOffline
public bool IoOffline { get; }
MemoryCardOperation
public bool MemoryCardOperation { get; }
OneBlockStep
public bool OneBlockStep { get; }
OneInstructionStep
public bool OneInstructionStep { get; }
OneScanStep
public bool OneScanStep { get; }
Pc10Mode
public bool Pc10Mode { get; }
Pc3Mode
public bool Pc3Mode { get; }
PeriodicSamplingTrace
public bool PeriodicSamplingTrace { get; }
Program1Running
public bool Program1Running { get; }
Program2Running
public bool Program2Running { get; }
Program3Running
public bool Program3Running { get; }
RawBytes
public byte[] RawBytes { get; }
RawBytesHex
public string RawBytesHex { get; }
ReadProtectedSystemIo
public bool ReadProtectedSystemIo { get; }
ReadProtectedSystemMemory
public bool ReadProtectedSystemMemory { get; }
RemoteRunSetting
public bool RemoteRunSetting { get; }
Run
public bool Run { get; }
ScanSamplingTrace
public bool ScanSamplingTrace { get; }
StatusLatchSetting
public bool StatusLatchSetting { get; }
Trace
public bool Trace { get; }
TriggerDetected
public bool TriggerDetected { get; }
UnderPseudoStop
public bool UnderPseudoStop { get; }
UnderStop
public bool UnderStop { get; }
UnderStopRequestContinuity
public bool UnderStopRequestContinuity { get; }
UnderWritingDuringRun
public bool UnderWritingDuringRun { get; }
UnderWritingFlashRegister
public bool UnderWritingFlashRegister { get; }
WithMemoryCard
public bool WithMemoryCard { get; }
WritePriorityLimitedProgramInfo
public bool WritePriorityLimitedProgramInfo { get; }
WriteProtectedProgramInfo
public bool WriteProtectedProgramInfo { get; }
WriteProtectedSystemIo
public bool WriteProtectedSystemIo { get; }
WriteProtectedSystemMemory
public bool WriteProtectedSystemMemory { get; }

ExNoAddress32

public sealed class ExNoAddress32

Members

ExNoAddress32
public ExNoAddress32(int ExNo, int Address, string Unit)
Address
public int Address { get; init; }
ExNo
public int ExNo { get; init; }
Unit
public string Unit { get; init; }

ExtNoAddress

public sealed class ExtNoAddress

Members

ExtNoAddress
public ExtNoAddress(int No, int Address, string Unit)
Address
public int Address { get; init; }
No
public int No { get; init; }
Unit
public string Unit { get; init; }

ParsedAddress

public sealed class ParsedAddress

Members

ParsedAddress
public ParsedAddress(string Area, int Index, string Unit, bool High = false, bool Packed = false, int? DigitCount = null)
Area
public string Area { get; init; }
DigitCount
public int? DigitCount { get; init; }
High
public bool High { get; init; }
Index
public int Index { get; init; }
Packed
public bool Packed { get; init; }
Unit
public string Unit { get; init; }

RelayLayer

public sealed class RelayLayer

Members

RelayLayer
public RelayLayer(int LinkNo, int StationNo, int Ack, byte[] InnerRaw, byte[] Padding = null)
Ack
public int Ack { get; init; }
InnerRaw
public byte[] InnerRaw { get; init; }
LinkNo
public int LinkNo { get; init; }
Padding
public byte[] Padding { get; init; }
StationNo
public int StationNo { get; init; }

ResolvedDevice

public sealed class ResolvedDevice

Members

ResolvedDevice
public ResolvedDevice(string Text, string Scheme, string Unit, string Area, int Index, string Prefix = null, bool High = false, bool Packed = false, int? BasicAddress = null, int? No = null, int? Address = null, int? BitNo = null, int? Address32 = null)
Address
public int? Address { get; init; }
Address32
public int? Address32 { get; init; }
Area
public string Area { get; init; }
BasicAddress
public int? BasicAddress { get; init; }
BitNo
public int? BitNo { get; init; }
High
public bool High { get; init; }
Index
public int Index { get; init; }
No
public int? No { get; init; }
Packed
public bool Packed { get; init; }
PlcProfile
public string PlcProfile { get; init; }

Gets the canonical PLC profile used to resolve this device.

Prefix
public string Prefix { get; init; }
Scheme
public string Scheme { get; init; }
Text
public string Text { get; init; }
Unit
public string Unit { get; init; }

ResponseFrame

public sealed class ResponseFrame

Members

ResponseFrame
public ResponseFrame(byte Ft, byte Rc, byte Cmd, byte[] Data)
Cmd
public byte Cmd { get; init; }
Data
public byte[] Data { get; init; }
Ft
public byte Ft { get; init; }
Rc
public byte Rc { get; init; }

ToyopucAddress

public static class ToyopucAddress

Public helpers for TOYOPUC address parsing, formatting, normalization, and low-level encoding.

Remarks: This type serves two audiences: Applications that need canonical address text for generated documentation or UI. Low-level tooling that needs to encode resolved addresses into transport-specific numeric forms. The higher-level parse, format, and normalize methods are the recommended public entry points for most callers.

Members

EncodeBitAddress
public static int EncodeBitAddress(ParsedAddress address)
EncodeByteAddress
public static int EncodeByteAddress(ParsedAddress address)
EncodeExNoBitU32
public static int EncodeExNoBitU32(int exNo, int bitAddress)
EncodeExNoByteU32
public static int EncodeExNoByteU32(int exNo, int byteAddress)
EncodeExtNoAddress
public static ExtNoAddress EncodeExtNoAddress(string area, int index, string unit)
EncodeFrWordAddr32
public static int EncodeFrWordAddr32(int index)
EncodePc10BitAddress
public static int EncodePc10BitAddress(ParsedAddress address)
EncodeProgramBitAddress
public static ValueTuple<int, int> EncodeProgramBitAddress(ParsedAddress address)
EncodeProgramByteAddress
public static int EncodeProgramByteAddress(ParsedAddress address)
EncodeProgramWordAddress
public static int EncodeProgramWordAddress(ParsedAddress address)
EncodeWordAddress
public static int EncodeWordAddress(ParsedAddress address)
Format
public static string Format(ResolvedDevice address)

Formats a resolved device back to canonical text.

Returns: Canonical uppercase device text.

Parameters: - address: Resolved device to format.

Format
public static string Format(ResolvedDevice address, int index)

Formats a resolved device using an explicit index override.

Returns: Canonical uppercase device text for the supplied index.

Parameters: - address: Resolved device metadata to reuse. - index: Explicit logical index to format.

FrBlockExNo
public static int FrBlockExNo(int index)
Normalize
public static string Normalize(string text, string plcProfile)

Normalizes a device string to canonical casing and width.

Returns: The canonical representation returned by Format.

Parameters: - text: Input device text in any supported spelling. - plcProfile: Required profile name used by the resolver.

Parse
public static ResolvedDevice Parse(string text, string plcProfile)

Parses a canonical device string into a resolved device shape.

Returns: The resolved device shape.

Parameters: - text: Canonical or profile-aware device text such as D0000, P1-D0000, or M0000. - plcProfile: Required PLC profile name used to resolve profile-specific address rules.

SplitU32Words
public static ValueTuple<int, int> SplitU32Words(int value)
TryParse
public static bool TryParse(string text, string plcProfile, out ResolvedDevice address)

Attempts to parse a canonical device string into a resolved device shape.

Returns: true when parsing succeeds; otherwise false.

Parameters: - text: Device text to parse. - plcProfile: Required profile name used by the resolver. - address: When this method returns true, receives the resolved device.

ToyopucAddressRange

public sealed class ToyopucAddressRange

Members

ToyopucAddressRange
public ToyopucAddressRange(int Start, int End)
Contains
public bool Contains(int index)
End
public int End { get; init; }
Start
public int Start { get; init; }

ToyopucAreaDescriptor

public sealed class ToyopucAreaDescriptor

Members

ToyopucAreaDescriptor
public ToyopucAreaDescriptor(string Area, IReadOnlyList<ToyopucAddressRange> DirectRanges, IReadOnlyList<ToyopucAddressRange> PrefixedRanges, bool SupportsPackedWord, int AddressWidth, int SuggestedStartStep, IReadOnlyList<ToyopucAddressRange> PackedDirectRangesOverride = null, IReadOnlyList<ToyopucAddressRange> PackedPrefixedRangesOverride = null)
GetAddressWidth
public int GetAddressWidth(string unit, bool packed = false)
GetRanges
public IReadOnlyList<ToyopucAddressRange> GetRanges(bool prefixed, bool packed)
GetRanges
public IReadOnlyList<ToyopucAddressRange> GetRanges(bool prefixed, string unit, bool packed = false)
UsesDerivedAccess
public bool UsesDerivedAccess(string unit, bool packed = false)
AddressWidth
public int AddressWidth { get; init; }
Area
public string Area { get; init; }
DerivedAddressWidth
public int DerivedAddressWidth { get; }
DirectRange
public ToyopucAddressRange DirectRange { get; }
DirectRanges
public IReadOnlyList<ToyopucAddressRange> DirectRanges { get; init; }
PackedAddressWidth
public int PackedAddressWidth { get; }
PackedDirectRange
public ToyopucAddressRange PackedDirectRange { get; }
PackedDirectRangesOverride
public IReadOnlyList<ToyopucAddressRange> PackedDirectRangesOverride { get; init; }
PackedPrefixedRange
public ToyopucAddressRange PackedPrefixedRange { get; }
PackedPrefixedRangesOverride
public IReadOnlyList<ToyopucAddressRange> PackedPrefixedRangesOverride { get; init; }
PrefixedRange
public ToyopucAddressRange PrefixedRange { get; }
PrefixedRanges
public IReadOnlyList<ToyopucAddressRange> PrefixedRanges { get; init; }
SuggestedStartStep
public int SuggestedStartStep { get; init; }
SupportsDirect
public bool SupportsDirect { get; }
SupportsPackedWord
public bool SupportsPackedWord { get; init; }
SupportsPrefixed
public bool SupportsPrefixed { get; }

ToyopucClient

public class ToyopucClient

Provides direct Computer Link operations over one TCP or UDP session.

Remarks: Public asynchronous live operations enter one arrival-order FIFO queue per client. At most one operation owns the transport, queue waiting does not consume the transaction timeout, and cancellation while waiting performs no transport activity.

Members

ToyopucClient
public ToyopucClient(string host, int port, ToyopucTransportMode transport, int localPort = 0, TimeSpan? timeout = null, int retries = 0, TimeSpan? retryDelay = null)
Close
public virtual void Close()

Closes the connection and rejects active and queued operations from its transport generation.

CloseAsync
public virtual Task CloseAsync()

Closes the connection and rejects active and queued operations from its transport generation.

CommitFrBlock
public void CommitFrBlock(int index)
CommitFrBlockAsync
public Task CommitFrBlockAsync(int index, CancellationToken cancellationToken = default)
Dispose
public void Dispose()

Permanently disposes the client and rejects active and queued operations.

DisposeAsync
public virtual ValueTask DisposeAsync()

Asynchronously completes terminal disposal of the client.

Open
public virtual void Open()
OpenAsync
public virtual Task OpenAsync(CancellationToken cancellationToken = default)

Opens the configured TCP or UDP transport asynchronously.

Remarks: This native asynchronous contract does not invoke a synchronous Open override. Derived clients that customize connection establishment must override this method explicitly.

Pc10BlockRead
public byte[] Pc10BlockRead(int address32, int count)
Pc10BlockReadAsync
public Task<byte[]> Pc10BlockReadAsync(int address32, int count, CancellationToken cancellationToken = default)
Pc10BlockWrite
public void Pc10BlockWrite(int address32, byte[] dataBytes)
Pc10BlockWriteAsync
public Task Pc10BlockWriteAsync(int address32, byte[] dataBytes, CancellationToken cancellationToken = default)
Pc10MultiRead
public byte[] Pc10MultiRead(byte[] payload)
Pc10MultiReadAsync
public Task<byte[]> Pc10MultiReadAsync(byte[] payload, CancellationToken cancellationToken = default)
Pc10MultiWrite
public void Pc10MultiWrite(byte[] payload)
Pc10MultiWriteAsync
public Task Pc10MultiWriteAsync(byte[] payload, CancellationToken cancellationToken = default)
ReadBit
public bool ReadBit(int address)
ReadBitAsync
public Task<bool> ReadBitAsync(int address, CancellationToken cancellationToken = default)
ReadBytes
public byte[] ReadBytes(int address, int count)
ReadBytesAsync
public Task<byte[]> ReadBytesAsync(int address, int count, CancellationToken cancellationToken = default)
ReadBytesMulti
public byte[] ReadBytesMulti(IEnumerable<int> addresses)
ReadBytesMultiAsync
public Task<byte[]> ReadBytesMultiAsync(IEnumerable<int> addresses, CancellationToken cancellationToken = default)
ReadClock
public ClockData ReadClock()
ReadClockAsync
public Task<ClockData> ReadClockAsync(CancellationToken cancellationToken = default)
ReadCpuStatus
public CpuStatusData ReadCpuStatus()
ReadCpuStatusA0
public CpuStatusData ReadCpuStatusA0()
ReadCpuStatusA0Async
public Task<CpuStatusData> ReadCpuStatusA0Async(CancellationToken cancellationToken = default)
ReadCpuStatusA0Raw
public byte[] ReadCpuStatusA0Raw()
ReadCpuStatusA0RawAsync
public Task<byte[]> ReadCpuStatusA0RawAsync(CancellationToken cancellationToken = default)
ReadCpuStatusAsync
public Task<CpuStatusData> ReadCpuStatusAsync(CancellationToken cancellationToken = default)
ReadDWord
public uint ReadDWord(int address)
ReadDWordAsync
public Task<uint> ReadDWordAsync(int address, CancellationToken cancellationToken = default)
ReadDWords
public uint[] ReadDWords(int address, int count)
ReadDWordsAsync
public Task<uint[]> ReadDWordsAsync(int address, int count, CancellationToken cancellationToken = default)
ReadExtBytes
public byte[] ReadExtBytes(int number, int address, int count)
ReadExtBytesAsync
public Task<byte[]> ReadExtBytesAsync(int number, int address, int count, CancellationToken cancellationToken = default)
ReadExtMulti
public byte[] ReadExtMulti(IEnumerable<ValueTuple<int, int, int>> bitPoints, IEnumerable<ValueTuple<int, int>> bytePoints, IEnumerable<ValueTuple<int, int>> wordPoints)
ReadExtMultiAsync
public Task<byte[]> ReadExtMultiAsync(IEnumerable<ValueTuple<int, int, int>> bitPoints, IEnumerable<ValueTuple<int, int>> bytePoints, IEnumerable<ValueTuple<int, int>> wordPoints, CancellationToken cancellationToken = default)
ReadExtWords
public int[] ReadExtWords(int number, int address, int count)
ReadExtWordsAsync
public Task<int[]> ReadExtWordsAsync(int number, int address, int count, CancellationToken cancellationToken = default)
ReadFloat32
public float ReadFloat32(int address)
ReadFloat32Async
public Task<float> ReadFloat32Async(int address, CancellationToken cancellationToken = default)
ReadFloat32s
public float[] ReadFloat32s(int address, int count)
ReadFloat32sAsync
public Task<float[]> ReadFloat32sAsync(int address, int count, CancellationToken cancellationToken = default)
ReadFrWords
public int[] ReadFrWords(int index, int count)
ReadFrWordsAsync
public Task<int[]> ReadFrWordsAsync(int index, int count, CancellationToken cancellationToken = default)
ReadWords
public int[] ReadWords(int address, int count)
ReadWordsAsync
public Task<int[]> ReadWordsAsync(int address, int count, CancellationToken cancellationToken = default)
ReadWordsMulti
public int[] ReadWordsMulti(IEnumerable<int> addresses)
ReadWordsMultiAsync
public Task<int[]> ReadWordsMultiAsync(IEnumerable<int> addresses, CancellationToken cancellationToken = default)
RelayCommitFrBlock
public void RelayCommitFrBlock(object hops, int index)
RelayCommitFrBlockAsync
public Task RelayCommitFrBlockAsync(object hops, int index, CancellationToken cancellationToken = default)
RelayReadClock
public ClockData RelayReadClock(object hops)
RelayReadClockAsync
public Task<ClockData> RelayReadClockAsync(object hops, CancellationToken cancellationToken = default)
RelayReadCpuStatus
public CpuStatusData RelayReadCpuStatus(object hops)
RelayReadCpuStatusA0
public CpuStatusData RelayReadCpuStatusA0(object hops)
RelayReadCpuStatusA0Async
public Task<CpuStatusData> RelayReadCpuStatusA0Async(object hops, CancellationToken cancellationToken = default)
RelayReadCpuStatusA0Raw
public byte[] RelayReadCpuStatusA0Raw(object hops)
RelayReadCpuStatusA0RawAsync
public Task<byte[]> RelayReadCpuStatusA0RawAsync(object hops, CancellationToken cancellationToken = default)
RelayReadCpuStatusAsync
public Task<CpuStatusData> RelayReadCpuStatusAsync(object hops, CancellationToken cancellationToken = default)
RelayReadWords
public int[] RelayReadWords(object hops, int address, int count)
RelayReadWordsAsync
public Task<int[]> RelayReadWordsAsync(object hops, int address, int count, CancellationToken cancellationToken = default)
RelayReleaseScanStop
public void RelayReleaseScanStop(object hops)
RelayReleaseScanStopAsync
public Task RelayReleaseScanStopAsync(object hops, CancellationToken cancellationToken = default)
RelayResumeScan
public void RelayResumeScan(object hops)
RelayResumeScanAsync
public Task RelayResumeScanAsync(object hops, CancellationToken cancellationToken = default)
RelayStopScan
public void RelayStopScan(object hops)
RelayStopScanAsync
public Task RelayStopScanAsync(object hops, CancellationToken cancellationToken = default)
RelayWriteClock
public void RelayWriteClock(object hops, DateTime value, int yearBase)
RelayWriteClockAsync
public Task RelayWriteClockAsync(object hops, DateTime value, int yearBase, CancellationToken cancellationToken = default)
RelayWriteFrWorkArea
public void RelayWriteFrWorkArea(object hops, int index, IEnumerable<int> values)
RelayWriteFrWorkAreaAsync
public Task RelayWriteFrWorkAreaAsync(object hops, int index, IEnumerable<int> values, CancellationToken cancellationToken = default)
RelayWriteWords
public void RelayWriteWords(object hops, int address, IEnumerable<int> values)
RelayWriteWordsAsync
public Task RelayWriteWordsAsync(object hops, int address, IEnumerable<int> values, CancellationToken cancellationToken = default)
ReleaseScanStop
public void ReleaseScanStop()
ReleaseScanStopAsync
public Task ReleaseScanStopAsync(CancellationToken cancellationToken = default)
ResumeScan
public void ResumeScan()
ResumeScanAsync
public Task ResumeScanAsync(CancellationToken cancellationToken = default)
StopScan
public void StopScan()
StopScanAsync
public Task StopScanAsync(CancellationToken cancellationToken = default)
WriteBit
public void WriteBit(int address, bool value)
WriteBitAsync
public Task WriteBitAsync(int address, bool value, CancellationToken cancellationToken = default)
WriteBytes
public void WriteBytes(int address, IEnumerable<int> values)
WriteBytesAsync
public Task WriteBytesAsync(int address, IEnumerable<int> values, CancellationToken cancellationToken = default)
WriteBytesMulti
public void WriteBytesMulti(IEnumerable<ValueTuple<int, int>> pairs)
WriteBytesMultiAsync
public Task WriteBytesMultiAsync(IEnumerable<ValueTuple<int, int>> pairs, CancellationToken cancellationToken = default)
WriteClock
public void WriteClock(DateTime value, int yearBase)
WriteClockAsync
public Task WriteClockAsync(DateTime value, int yearBase, CancellationToken cancellationToken = default)
WriteDWord
public void WriteDWord(int address, uint value)
WriteDWordAsync
public Task WriteDWordAsync(int address, uint value, CancellationToken cancellationToken = default)
WriteDWords
public void WriteDWords(int address, IEnumerable<uint> values)
WriteDWordsAsync
public Task WriteDWordsAsync(int address, IEnumerable<uint> values, CancellationToken cancellationToken = default)
WriteExtBytes
public void WriteExtBytes(int number, int address, IEnumerable<int> values)
WriteExtBytesAsync
public Task WriteExtBytesAsync(int number, int address, IEnumerable<int> values, CancellationToken cancellationToken = default)
WriteExtMulti
public void WriteExtMulti(IEnumerable<ValueTuple<int, int, int, int>> bitPoints, IEnumerable<ValueTuple<int, int, int>> bytePoints, IEnumerable<ValueTuple<int, int, int>> wordPoints)
WriteExtMultiAsync
public Task WriteExtMultiAsync(IEnumerable<ValueTuple<int, int, int, int>> bitPoints, IEnumerable<ValueTuple<int, int, int>> bytePoints, IEnumerable<ValueTuple<int, int, int>> wordPoints, CancellationToken cancellationToken = default)
WriteExtWords
public void WriteExtWords(int number, int address, IEnumerable<int> values)
WriteExtWordsAsync
public Task WriteExtWordsAsync(int number, int address, IEnumerable<int> values, CancellationToken cancellationToken = default)
WriteFloat32
public void WriteFloat32(int address, float value)
WriteFloat32Async
public Task WriteFloat32Async(int address, float value, CancellationToken cancellationToken = default)
WriteFloat32s
public void WriteFloat32s(int address, IEnumerable<float> values)
WriteFloat32sAsync
public Task WriteFloat32sAsync(int address, IEnumerable<float> values, CancellationToken cancellationToken = default)
WriteFrWorkArea
public void WriteFrWorkArea(int index, IEnumerable<int> values)
WriteFrWorkAreaAsync
public Task WriteFrWorkAreaAsync(int index, IEnumerable<int> values, CancellationToken cancellationToken = default)
WriteWords
public void WriteWords(int address, IEnumerable<int> values)
WriteWordsAsync
public Task WriteWordsAsync(int address, IEnumerable<int> values, CancellationToken cancellationToken = default)
WriteWordsMulti
public void WriteWordsMulti(IEnumerable<ValueTuple<int, int>> pairs)
WriteWordsMultiAsync
public Task WriteWordsMultiAsync(IEnumerable<ValueTuple<int, int>> pairs, CancellationToken cancellationToken = default)
Host
public string Host { get; }
IsOpen
public bool IsOpen { get; }
LastRx
public byte[] LastRx { get; }
LastTx
public byte[] LastTx { get; }
LocalPort
public int LocalPort { get; }
Port
public int Port { get; }
Retries
public int Retries { get; }
RetryDelay
public TimeSpan RetryDelay { get; }
Timeout
public TimeSpan Timeout { get; }
TrafficStats
public ToyopucTrafficStats TrafficStats { get; }
Transport
public ToyopucTransportMode Transport { get; }

ToyopucConnectionClosedException

public sealed class ToyopucConnectionClosedException

Indicates that Close retired the transport generation that owned an active or queued operation.

Members

ToyopucConnectionClosedException
public ToyopucConnectionClosedException()

ToyopucConnectionOptions

public sealed class ToyopucConnectionOptions

Explicit connection options for a stable TOYOPUC device session.

Remarks: This type keeps transport, profile, retry, and relay settings explicit for the unified high-level connection flow and generated API documentation.

Members

ToyopucConnectionOptions
public ToyopucConnectionOptions(string Host, int Port, ToyopucTransportMode Transport, string PlcProfile, ToyopucRoute Route)

Explicit connection options for a stable TOYOPUC device session.

Remarks: This type keeps transport, profile, retry, and relay settings explicit for the unified high-level connection flow and generated API documentation.

Parameters: - Host: PLC IPv4 address or a hostname that resolves to IPv4. - Port: PLC port number. - Transport: Explicit TCP or UDP transport. - PlcProfile: Required canonical PLC profile name. - Route: Explicit direct or relay route.

EffectiveRetryDelay
public TimeSpan EffectiveRetryDelay { get; }

Gets the effective retry delay used for a new client instance.

EffectiveTimeout
public TimeSpan EffectiveTimeout { get; }

Gets the effective timeout used for a new client instance.

Host
public string Host { get; init; }

PLC IPv4 address or a hostname that resolves to IPv4.

LocalPort
public int LocalPort { get; init; }

Gets or initializes the local UDP port. TCP requires zero; a nonzero value is rejected.

PlcProfile
public string PlcProfile { get; init; }

Required canonical PLC profile name.

Port
public int Port { get; init; }

PLC port number.

Retries
public int Retries { get; init; }

Gets or initializes the retry count for transport operations.

RetryDelay
public TimeSpan? RetryDelay { get; init; }

Gets or initializes the retry delay. The inclusive maximum is 2,147,483,647 milliseconds.

Route
public ToyopucRoute Route { get; init; }

Explicit direct or relay route.

Timeout
public TimeSpan? Timeout { get; init; }

Gets or initializes the communication timeout.

Remarks: When omitted, each communication attempt uses three seconds. The inclusive maximum is 2,147,483,647 milliseconds.

Transport
public ToyopucTransportMode Transport { get; init; }

Explicit TCP or UDP transport.

ToyopucDeviceCatalog

public static class ToyopucDeviceCatalog

Members

FormatAddressRange
public static string FormatAddressRange(string familyCode, ToyopucAddressRange range, int width)
FormatAddressRanges
public static string FormatAddressRanges(string familyCode, IEnumerable<ToyopucAddressRange> ranges, int width)
GetAreaDescriptor
public static ToyopucAreaDescriptor GetAreaDescriptor(string area, string profile = null)
GetAreaDescriptors
public static IReadOnlyList<ToyopucAreaDescriptor> GetAreaDescriptors(string profile = null)
GetAreas
public static IReadOnlyList<string> GetAreas(bool prefixed, string profile = null)
GetSuggestedStartAddresses
public static IReadOnlyList<string> GetSuggestedStartAddresses(string area, string prefix, string profile)
GetSuggestedStartAddresses
public static IReadOnlyList<string> GetSuggestedStartAddresses(string area, string prefix, string unit, bool packed, string profile)
GetSupportedRange
public static ToyopucAddressRange GetSupportedRange(string area, bool prefixed, bool packed, string profile = null)
GetSupportedRange
public static ToyopucAddressRange GetSupportedRange(string area, bool prefixed, string profile = null)
GetSupportedRange
public static ToyopucAddressRange GetSupportedRange(string area, bool prefixed, string unit, bool packed = false, string profile = null)
GetSupportedRanges
public static IReadOnlyList<ToyopucAddressRange> GetSupportedRanges(string area, bool prefixed, bool packed, string profile = null)
GetSupportedRanges
public static IReadOnlyList<ToyopucAddressRange> GetSupportedRanges(string area, bool prefixed, string profile = null)
GetSupportedRanges
public static IReadOnlyList<ToyopucAddressRange> GetSupportedRanges(string area, bool prefixed, string unit, bool packed = false, string profile = null)
IsSupportedIndex
public static bool IsSupportedIndex(string area, int index, bool prefixed, bool packed, string profile = null)
IsSupportedIndex
public static bool IsSupportedIndex(string area, int index, bool prefixed, string profile = null)
IsSupportedIndex
public static bool IsSupportedIndex(string area, int index, bool prefixed, string unit, bool packed = false, string profile = null)

ToyopucDeviceClient

public class ToyopucDeviceClient

Provides profile-bound high-level Computer Link operations through one immutable direct or relay route.

Members

ToyopucDeviceClient
public ToyopucDeviceClient(string host, int port, ToyopucTransportMode transport, string plcProfile, int localPort = 0, TimeSpan? timeout = null, int retries = 0, TimeSpan? retryDelay = null, ToyopucRoute route = null)

Creates a profile-bound client with an optional immutable route.

Parameters: - host: PLC IPv4 address or hostname that resolves to IPv4. - port: PLC port. - transport: Explicit TCP or UDP transport. - plcProfile: Exact canonical PLC profile. - localPort: Local UDP port, or zero for an ephemeral port. - timeout: Per-transaction timeout. - retries: Retry count for failures proven to occur before any request send. - retryDelay: Delay between permitted pre-send retries. - route: Immutable direct or relay route; defaults to direct.

CommitFrBlock
public void CommitFrBlock(object device)
CommitFrBlockAsync
public Task CommitFrBlockAsync(object device, CancellationToken cancellationToken = default)
ReadClockAsync
public Task<ClockData> ReadClockAsync(CancellationToken cancellationToken = default)

Reads the PLC clock through the route selected for this client.

ReadCpuStatusA0Async
public Task<CpuStatusData> ReadCpuStatusA0Async(CancellationToken cancellationToken = default)

Reads parsed A0 CPU status through the route selected for this client.

ReadCpuStatusA0RawAsync
public Task<byte[]> ReadCpuStatusA0RawAsync(CancellationToken cancellationToken = default)

Reads raw A0 CPU status through the route selected for this client.

ReadCpuStatusAsync
public Task<CpuStatusData> ReadCpuStatusAsync(CancellationToken cancellationToken = default)

Reads PLC CPU status through the route selected for this client.

ReadDWord
public uint ReadDWord(object device)
ReadDWordAsync
public Task<uint> ReadDWordAsync(object device, CancellationToken cancellationToken = default)
ReadDWords
public uint[] ReadDWords(object device, int count)
ReadDWordsAsync
public Task<uint[]> ReadDWordsAsync(object device, int count, CancellationToken cancellationToken = default)
ReadDevices
public object[] ReadDevices(IEnumerable<object> devices)
ReadDevicesAsync
public Task<object[]> ReadDevicesAsync(IEnumerable<object> devices, CancellationToken cancellationToken = default)
ReadFloat32
public float ReadFloat32(object device)
ReadFloat32Async
public Task<float> ReadFloat32Async(object device, CancellationToken cancellationToken = default)
ReadFloat32s
public float[] ReadFloat32s(object device, int count)
ReadFloat32sAsync
public Task<float[]> ReadFloat32sAsync(object device, int count, CancellationToken cancellationToken = default)
ReadFr
public object[] ReadFr(object device, int count)
ReadFrAsync
public Task<object[]> ReadFrAsync(object device, int count, CancellationToken cancellationToken = default)
ReadFrOne
public object ReadFrOne(object device)
ReadFrOneAsync
public Task<object> ReadFrOneAsync(object device, CancellationToken cancellationToken = default)
ReadMany
public object[] ReadMany(object device, int count)
ReadManyAsync
public Task<object[]> ReadManyAsync(object device, int count, CancellationToken cancellationToken = default)
ReadOne
public object ReadOne(object device)
ReadOneAsync
public Task<object> ReadOneAsync(object device, CancellationToken cancellationToken = default)
RelayCommitFrBlock
public void RelayCommitFrBlock(object hops, object device)
RelayCommitFrBlockAsync
public Task RelayCommitFrBlockAsync(object hops, object device, CancellationToken cancellationToken = default)
RelayReadDWord
public uint RelayReadDWord(object hops, object device)
RelayReadDWordAsync
public Task<uint> RelayReadDWordAsync(object hops, object device, CancellationToken cancellationToken = default)
RelayReadDWords
public uint[] RelayReadDWords(object hops, object device, int count)
RelayReadDWordsAsync
public Task<uint[]> RelayReadDWordsAsync(object hops, object device, int count, CancellationToken cancellationToken = default)
RelayReadDevices
public object[] RelayReadDevices(object hops, IEnumerable<object> devices)
RelayReadDevicesAsync
public Task<object[]> RelayReadDevicesAsync(object hops, IEnumerable<object> devices, CancellationToken cancellationToken = default)
RelayReadFloat32
public float RelayReadFloat32(object hops, object device)
RelayReadFloat32Async
public Task<float> RelayReadFloat32Async(object hops, object device, CancellationToken cancellationToken = default)
RelayReadFloat32s
public float[] RelayReadFloat32s(object hops, object device, int count)
RelayReadFloat32sAsync
public Task<float[]> RelayReadFloat32sAsync(object hops, object device, int count, CancellationToken cancellationToken = default)
RelayReadFr
public object[] RelayReadFr(object hops, object device, int count)
RelayReadFrAsync
public Task<object[]> RelayReadFrAsync(object hops, object device, int count, CancellationToken cancellationToken = default)
RelayReadFrOne
public object RelayReadFrOne(object hops, object device)
RelayReadFrOneAsync
public Task<object> RelayReadFrOneAsync(object hops, object device, CancellationToken cancellationToken = default)
RelayReadMany
public object[] RelayReadMany(object hops, object device, int count)
RelayReadManyAsync
public Task<object[]> RelayReadManyAsync(object hops, object device, int count, CancellationToken cancellationToken = default)
RelayReadOne
public object RelayReadOne(object hops, object device)
RelayReadOneAsync
public Task<object> RelayReadOneAsync(object hops, object device, CancellationToken cancellationToken = default)
RelayReadWords
public object[] RelayReadWords(object hops, object device, int count)
RelayReadWordsAsync
public Task<object[]> RelayReadWordsAsync(object hops, object device, int count, CancellationToken cancellationToken = default)
RelayWrite
public void RelayWrite(object hops, object device, object value)
RelayWriteAsync
public Task RelayWriteAsync(object hops, object device, object value, CancellationToken cancellationToken = default)
RelayWriteDWord
public void RelayWriteDWord(object hops, object device, uint value)
RelayWriteDWordAsync
public Task RelayWriteDWordAsync(object hops, object device, uint value, CancellationToken cancellationToken = default)
RelayWriteDWords
public void RelayWriteDWords(object hops, object device, IEnumerable<uint> values)
RelayWriteDWordsAsync
public Task RelayWriteDWordsAsync(object hops, object device, IEnumerable<uint> values, CancellationToken cancellationToken = default)
RelayWriteFloat32
public void RelayWriteFloat32(object hops, object device, float value)
RelayWriteFloat32Async
public Task RelayWriteFloat32Async(object hops, object device, float value, CancellationToken cancellationToken = default)
RelayWriteFloat32s
public void RelayWriteFloat32s(object hops, object device, IEnumerable<float> values)
RelayWriteFloat32sAsync
public Task RelayWriteFloat32sAsync(object hops, object device, IEnumerable<float> values, CancellationToken cancellationToken = default)
RelayWriteFrWorkArea
public void RelayWriteFrWorkArea(object hops, object device, object value)
RelayWriteFrWorkAreaAsync
public Task RelayWriteFrWorkAreaAsync(object hops, object device, object value, CancellationToken cancellationToken = default)
RelayWriteMany
public void RelayWriteMany(object hops, IEnumerable<KeyValuePair<object, object>> items)
RelayWriteManyAsync
public Task RelayWriteManyAsync(object hops, IEnumerable<KeyValuePair<object, object>> items, CancellationToken cancellationToken = default)
RelayWriteWords
public void RelayWriteWords(object hops, object device, object value)
RelayWriteWordsAsync
public Task RelayWriteWordsAsync(object hops, object device, object value, CancellationToken cancellationToken = default)
ReleaseScanStopAsync
public Task ReleaseScanStopAsync(CancellationToken cancellationToken = default)

Releases PLC scan stop through the route selected for this client.

ResolveDevice
public ResolvedDevice ResolveDevice(string device)
ResolveDeviceAsync
public Task<ResolvedDevice> ResolveDeviceAsync(string device, CancellationToken cancellationToken = default)
ResumeScanAsync
public Task ResumeScanAsync(CancellationToken cancellationToken = default)

Resumes PLC scan through the route selected for this client.

StopScanAsync
public Task StopScanAsync(CancellationToken cancellationToken = default)

Stops PLC scan through the route selected for this client.

Write
public void Write(object device, object value)
WriteAsync
public Task WriteAsync(object device, object value, CancellationToken cancellationToken = default)
WriteClockAsync
public Task WriteClockAsync(DateTime value, int yearBase, CancellationToken cancellationToken = default)

Writes the PLC clock through the route selected for this client.

WriteDWord
public void WriteDWord(object device, uint value)
WriteDWordAsync
public Task WriteDWordAsync(object device, uint value, CancellationToken cancellationToken = default)
WriteDWords
public void WriteDWords(object device, IEnumerable<uint> values)
WriteDWordsAsync
public Task WriteDWordsAsync(object device, IEnumerable<uint> values, CancellationToken cancellationToken = default)
WriteFloat32
public void WriteFloat32(object device, float value)
WriteFloat32Async
public Task WriteFloat32Async(object device, float value, CancellationToken cancellationToken = default)
WriteFloat32s
public void WriteFloat32s(object device, IEnumerable<float> values)
WriteFloat32sAsync
public Task WriteFloat32sAsync(object device, IEnumerable<float> values, CancellationToken cancellationToken = default)
WriteFrWorkArea
public void WriteFrWorkArea(object device, object value)
WriteFrWorkAreaAsync
public Task WriteFrWorkAreaAsync(object device, object value, CancellationToken cancellationToken = default)
WriteMany
public void WriteMany(IEnumerable<KeyValuePair<object, object>> items)
WriteManyAsync
public Task WriteManyAsync(IEnumerable<KeyValuePair<object, object>> items, CancellationToken cancellationToken = default)
PlcProfile
public string PlcProfile { get; }
RelayHops
public IReadOnlyList<ValueTuple<int, int>> RelayHops { get; }

Gets the immutable relay hops, or null for direct routing.

Route
public ToyopucRoute Route { get; }

Gets the immutable direct or relay route used by ordinary high-level operations.

UsesRelay
public bool UsesRelay { get; }

Gets a value indicating whether ordinary high-level operations use relay routing.

ToyopucDeviceClientExtensions

public static class ToyopucDeviceClientExtensions

High-level typed, named, polling, and contiguous-range operations for ToyopucDeviceClient.

Remarks: Typed and contiguous-range methods issue exactly one protocol request. ReadNamedAsync and each PollAsync cycle accept exactly one named address and therefore issue one request. Only WriteBitInWord and WriteBitInWordAsync are multi-request helpers: they perform an explicit read followed by a write while holding one local client FIFO turn and one absolute deadline.

Members

PollAsync
public static IAsyncEnumerable<IReadOnlyDictionary<string, object>> PollAsync(ToyopucDeviceClient client, IEnumerable<string> addresses, TimeSpan interval, CancellationToken ct = default)

Repeatedly reads exactly one named address, one request per cycle.

Remarks: Each cycle is independent; no atomicity is implied across polling cycles.

ReadDWordsAsync
public static Task<uint[]> ReadDWordsAsync(ToyopucDeviceClient client, string device, int count, CancellationToken ct = default)

Reads a contiguous double-word range using exactly one protocol request.

ReadNamedAsync
public static Task<IReadOnlyDictionary<string, object>> ReadNamedAsync(ToyopucDeviceClient client, IEnumerable<string> addresses, CancellationToken ct = default)

Reads exactly one named address using one protocol request.

Remarks: Multiple named addresses are rejected before transport; split reads must be explicit.

ReadTypedAsync
public static Task<object> ReadTypedAsync(ToyopucDeviceClient client, string device, string dtype, CancellationToken ct = default)

Reads one typed value using exactly one protocol request.

ReadWordsAsync
public static Task<ushort[]> ReadWordsAsync(ToyopucDeviceClient client, string device, int count, CancellationToken ct = default)

Reads a contiguous word range using exactly one protocol request.

WriteBitInWord
public static void WriteBitInWord(ToyopucDeviceClient client, string device, int bitIndex, bool value)

Synchronously sets or clears one bit in a word by an explicit read-modify-write sequence.

Remarks: The helper always performs one read followed by one write under one local FIFO turn and one deadline. It is not PLC-atomic and can overwrite a concurrent update to another bit in the same word. A failure after the write may have started is outcome-unknown and requires reconnect plus PLC-state reconciliation.

WriteBitInWordAsync
public static Task WriteBitInWordAsync(ToyopucDeviceClient client, string device, int bitIndex, bool value, CancellationToken ct = default)

Sets or clears one bit in a word by an explicit read-modify-write sequence.

Remarks: The read and write occupy one FIFO turn and share one absolute deadline, so this client's other operations cannot interleave. The helper always sends both requests, even when the bit is unchanged. It is not PLC-atomic: another client, PLC logic, or an external writer can change the word between them. Cancellation or failure after the write may have started is outcome-unknown and requires reconnect plus PLC-state reconciliation.

WriteDWordsAsync
public static Task WriteDWordsAsync(ToyopucDeviceClient client, string device, IReadOnlyList<uint> values, CancellationToken ct = default)

Writes a contiguous double-word range using exactly one protocol request.

WriteTypedAsync
public static Task WriteTypedAsync(ToyopucDeviceClient client, string device, string dtype, object value, CancellationToken ct = default)

Writes one typed value using exactly one protocol request.

WriteWordsAsync
public static Task WriteWordsAsync(ToyopucDeviceClient client, string device, IReadOnlyList<ushort> values, CancellationToken ct = default)

Writes a contiguous word range using exactly one protocol request.

ToyopucDeviceClientFactory

public static class ToyopucDeviceClientFactory

Factory helpers for creating connected TOYOPUC clients.

Remarks: This factory is the preferred application entry point when you want explicit profile, relay, retry, and timeout settings captured in one documented type.

Members

OpenAndConnectAsync
public static Task<ToyopucDeviceClient> OpenAndConnectAsync(ToyopucConnectionOptions options, CancellationToken cancellationToken = default)

Creates, configures, and opens a TOYOPUC client.

Remarks: The returned client keeps the required direct or relay route for every ordinary high-level operation.

Returns: A connected client whose ordinary async operations use one FIFO queue.

Parameters: - options: Explicit connection options. - cancellationToken: Cancellation token.

ToyopucDeviceResolver

public static class ToyopucDeviceResolver

Members

ResolveDevice
public static ResolvedDevice ResolveDevice(string device, string profile)

ToyopucError

public class ToyopucError

Members

ToyopucError
public ToyopucError()
ToyopucError
public ToyopucError(string message)
ToyopucError
public ToyopucError(string message, Exception innerException)

ToyopucNotConnectedException

public sealed class ToyopucNotConnectedException

Indicates that an operation requires an explicit reconnect before it can run.

Members

ToyopucNotConnectedException
public ToyopucNotConnectedException(string message)

ToyopucOperationOutcomeUnknownException

public sealed class ToyopucOperationOutcomeUnknownException

Indicates that cancellation or transport loss occurred after a state-changing request may have been sent.

Members

ToyopucOperationOutcomeUnknownException
public ToyopucOperationOutcomeUnknownException(ToyopucOutcomeUnknownReason reason, string message, Exception innerException)
Reason
public ToyopucOutcomeUnknownReason Reason { get; }

ToyopucOutcomeUnknownReason

public enum ToyopucOutcomeUnknownReason

Machine-readable reason why a state-changing operation has an unknown outcome.

Members

Cancellation
public const ToyopucOutcomeUnknownReason Cancellation
Closed
public const ToyopucOutcomeUnknownReason Closed
MalformedResponse
public const ToyopucOutcomeUnknownReason MalformedResponse
Timeout
public const ToyopucOutcomeUnknownReason Timeout
Transport
public const ToyopucOutcomeUnknownReason Transport

ToyopucPlcError

public sealed class ToyopucPlcError

Indicates that the PLC returned a syntactically valid NG response.

Members

ToyopucPlcError
public ToyopucPlcError(string message)

ToyopucPlcProfile

public sealed class ToyopucPlcProfile

Members

Areas
public IReadOnlyList<ToyopucAreaDescriptor> Areas { get; }
DisplayName
public string DisplayName { get; }
Name
public string Name { get; }

ToyopucPlcProfileDescriptor

public sealed class ToyopucPlcProfileDescriptor

Metadata used to present and select one canonical TOYOPUC PLC profile.

Members

ToyopucPlcProfileDescriptor
public ToyopucPlcProfileDescriptor(string CanonicalName, string DisplayName, bool Connectable, string BaseProfile)

Metadata used to present and select one canonical TOYOPUC PLC profile.

BaseProfile
public string BaseProfile { get; init; }
CanonicalName
public string CanonicalName { get; init; }
Connectable
public bool Connectable { get; init; }
DisplayName
public string DisplayName { get; init; }

ToyopucPlcProfiles

public static class ToyopucPlcProfiles

Members

FromName
public static ToyopucPlcProfile FromName(string profile)
GetDisplayName
public static string GetDisplayName(string profile)
GetNames
public static IReadOnlyList<string> GetNames()
GetProfileDescriptors
public static IReadOnlyList<ToyopucPlcProfileDescriptor> GetProfileDescriptors()

Returns presentation and connection metadata for every canonical PLC profile.

NormalizeName
public static string NormalizeName(string profile)
Generic
public static ToyopucPlcProfile Generic { get; }
Nano10GxCompatible
public static ToyopucPlcProfile Nano10GxCompatible { get; }
Nano10GxMode
public static ToyopucPlcProfile Nano10GxMode { get; }
Pc10GMode
public static ToyopucPlcProfile Pc10GMode { get; }
Pc10GStandardPc3Jg
public static ToyopucPlcProfile Pc10GStandardPc3Jg { get; }
Pc3JgMode
public static ToyopucPlcProfile Pc3JgMode { get; }
Pc3JgPc3Separate
public static ToyopucPlcProfile Pc3JgPc3Separate { get; }
Pc3JxPc3Separate
public static ToyopucPlcProfile Pc3JxPc3Separate { get; }
Pc3JxPlusExpansion
public static ToyopucPlcProfile Pc3JxPlusExpansion { get; }
ToyopucPlusExtended
public static ToyopucPlcProfile ToyopucPlusExtended { get; }
ToyopucPlusStandard
public static ToyopucPlcProfile ToyopucPlusStandard { get; }

ToyopucProtocol

public static class ToyopucProtocol

Members

FtCommand
public const byte FtCommand
FtResponse
public const byte FtResponse
BuildBitRead
public static byte[] BuildBitRead(int address)
BuildBitWrite
public static byte[] BuildBitWrite(int address, int value)
BuildByteRead
public static byte[] BuildByteRead(int address, int count)
BuildByteWrite
public static byte[] BuildByteWrite(int address, IEnumerable<int> values)
BuildClockRead
public static byte[] BuildClockRead()
BuildClockWrite
public static byte[] BuildClockWrite(int second, int minute, int hour, int day, int month, int year2Digit, int weekday)
BuildCpuStatusRead
public static byte[] BuildCpuStatusRead()
BuildCpuStatusReadA0
public static byte[] BuildCpuStatusReadA0()
BuildExtByteRead
public static byte[] BuildExtByteRead(int number, int address, int count)
BuildExtByteWrite
public static byte[] BuildExtByteWrite(int number, int address, IEnumerable<int> values)
BuildExtMultiRead
public static byte[] BuildExtMultiRead(IEnumerable<ValueTuple<int, int, int>> bitPoints, IEnumerable<ValueTuple<int, int>> bytePoints, IEnumerable<ValueTuple<int, int>> wordPoints)
BuildExtMultiWrite
public static byte[] BuildExtMultiWrite(IEnumerable<ValueTuple<int, int, int, int>> bitPoints, IEnumerable<ValueTuple<int, int, int>> bytePoints, IEnumerable<ValueTuple<int, int, int>> wordPoints)
BuildExtWordRead
public static byte[] BuildExtWordRead(int number, int address, int count)
BuildExtWordWrite
public static byte[] BuildExtWordWrite(int number, int address, IEnumerable<int> values)
BuildFrRegister
public static byte[] BuildFrRegister(int exNo)
BuildMultiByteRead
public static byte[] BuildMultiByteRead(IEnumerable<int> addresses)
BuildMultiByteWrite
public static byte[] BuildMultiByteWrite(IEnumerable<ValueTuple<int, int>> pairs)
BuildMultiWordRead
public static byte[] BuildMultiWordRead(IEnumerable<int> addresses)
BuildMultiWordWrite
public static byte[] BuildMultiWordWrite(IEnumerable<ValueTuple<int, int>> pairs)
BuildPc10BlockRead
public static byte[] BuildPc10BlockRead(int address32, int count)
BuildPc10BlockWrite
public static byte[] BuildPc10BlockWrite(int address32, byte[] dataBytes)
BuildPc10MultiRead
public static byte[] BuildPc10MultiRead(byte[] payload)
BuildPc10MultiWrite
public static byte[] BuildPc10MultiWrite(byte[] payload)
BuildRelayCommand
public static byte[] BuildRelayCommand(int linkNo, int stationNo, byte[] innerPayload)
BuildRelayNested
public static byte[] BuildRelayNested(IEnumerable<ValueTuple<int, int>> hops, byte[] innerPayload)
BuildScanResume
public static byte[] BuildScanResume()
BuildScanStop
public static byte[] BuildScanStop()
BuildScanStopRelease
public static byte[] BuildScanStopRelease()
BuildWordRead
public static byte[] BuildWordRead(int address, int count)
BuildWordWrite
public static byte[] BuildWordWrite(int address, IEnumerable<int> values)
PackBcd
public static int PackBcd(int value)
PackExtBitSpec
public static int PackExtBitSpec(int number, int bit)
PackU16LittleEndian
public static byte[] PackU16LittleEndian(int value)
ParseClockData
public static ClockData ParseClockData(byte[] data)
ParseCpuStatusData
public static CpuStatusData ParseCpuStatusData(byte[] data)
ParseCpuStatusDataA0
public static CpuStatusData ParseCpuStatusDataA0(byte[] data)
ParseCpuStatusDataA0Raw
public static byte[] ParseCpuStatusDataA0Raw(byte[] data)
ParseResponse
public static ResponseFrame ParseResponse(byte[] frame)
UnpackBcd
public static int UnpackBcd(int value)
UnpackU16LittleEndian
public static int[] UnpackU16LittleEndian(byte[] data)

ToyopucProtocolError

public class ToyopucProtocolError

Members

ToyopucProtocolError
public ToyopucProtocolError()
ToyopucProtocolError
public ToyopucProtocolError(string message)
ToyopucProtocolError
public ToyopucProtocolError(string message, Exception innerException)

ToyopucRelay

public static class ToyopucRelay

Members

FormatRelayHop
public static string FormatRelayHop(int linkNo, int stationNo)
NormalizeRelayHops
public static IReadOnlyList<ValueTuple<int, int>> NormalizeRelayHops(IEnumerable<ValueTuple<int, int>> hops)
NormalizeRelayHops
public static IReadOnlyList<ValueTuple<int, int>> NormalizeRelayHops(object hops)
ParseRelayHops
public static IReadOnlyList<ValueTuple<int, int>> ParseRelayHops(string text)
ParseRelayInnerResponse
public static ValueTuple<ResponseFrame, byte[]> ParseRelayInnerResponse(byte[] innerRaw)
UnwrapRelayResponseChain
public static ValueTuple<IReadOnlyList<RelayLayer>, ResponseFrame> UnwrapRelayResponseChain(ResponseFrame response)

ToyopucRoute

public sealed class ToyopucRoute

Selects the direct or relay route used by a high-level TOYOPUC session.

Members

Relay
public static ToyopucRoute Relay(object hops)

Creates an explicit relay route with one or more validated hops.

Returns: A validated relay route.

Parameters: - hops: Relay text or link/station tuples.

Direct
public static ToyopucRoute Direct { get; }

Gets the explicit direct route.

RelayHops
public IReadOnlyList<ValueTuple<int, int>> RelayHops { get; }

Gets the validated relay hops, or null for a direct route.

UsesRelay
public bool UsesRelay { get; }

Gets a value indicating whether this is a relay route.

ToyopucTimeoutError

public class ToyopucTimeoutError

Indicates that the configured connect or transaction deadline expired.

Members

ToyopucTimeoutError
public ToyopucTimeoutError()
ToyopucTimeoutError
public ToyopucTimeoutError(string message)
ToyopucTimeoutError
public ToyopucTimeoutError(string message, Exception innerException)

ToyopucTrafficStats

public struct ToyopucTrafficStats

Immutable lifetime traffic counters for one TOYOPUC client.

Members

ToyopucTrafficStats
public ToyopucTrafficStats(ulong RequestCount, ulong TxBytes, ulong RxBytes)

Immutable lifetime traffic counters for one TOYOPUC client.

RequestCount
public ulong RequestCount { get; init; }
RxBytes
public ulong RxBytes { get; init; }
TxBytes
public ulong TxBytes { get; init; }

ToyopucTransportError

public sealed class ToyopucTransportError

Indicates a transport I/O failure distinct from timeout and protocol decoding.

Members

ToyopucTransportError
public ToyopucTransportError(string message, Exception innerException)

ToyopucTransportMode

public enum ToyopucTransportMode

Members

Tcp
public const ToyopucTransportMode Tcp
Udp
public const ToyopucTransportMode Udp
Unspecified
public const ToyopucTransportMode Unspecified