Skip to main content

Namespace Brainboxes.IO

Classes

ASCIIProtocol

Implementation of Brainboxes.IO.IIOProtocol using the Brainboxes ASCII/DCON command protocol. This is the default protocol for ED-series devices on TCP port 9500.

BB400

Brainboxes BB-400 Neuron Edge Controller You can develop code to run remotely against the IO over the network or to run locally on the device itself The code remains the same, only (potentially) the IP address will change

BBSerialPort

Encapsulates a Brainboxes Serial Port, communicates over TCP rather than using the Com port API, this means no drivers are required to be installed on the computer

BBStream

Stream wrapper which adds ability to flush and check for available data on all streams which need to be accessed. Also adds ability to have a timeout on stream read and writes without the underlying connection closing on failure

Connection

Abstract base class for connections to Brainboxes devices. Provides caching for Brainboxes.IO.Connection.IsConnected and Brainboxes.IO.Connection.IsAvailable properties, and a background polling timer that raises Brainboxes.IO.Connection.ConnectionStatusChangedEvent when connection status changes.

DefaultSerialProtocol

Default implementation of Brainboxes.IO.ISerialProtocol for text-based serial communication over Brainboxes Ethernet-to-Serial devices (ES-series).

Device<Conn, Proto>

A generic Brainboxes Device

ED004

ED-004: Ethernet to 4 DIO + Ethernet to RS232

ED008

ED-008: Ethernet to 8 Digital IO Ports

ED038

ED-038: Ethernet to 3 x Relay + 3 Digital Inputs

ED204

ED-204: Ethernet to 4 DIO + Ethernet to RS232

ED516

ED-516: Ethernet to DIO 16 Digital Inputs + Serial Gateway

ED527

ED-527: Ethernet to DIO 16 Digital Outputs + Serial Gateway

ED538

ED-538: Ethernet to DIO 4 Digital Relays and 8 Digital Inputs + Serial Gateway

ED549

ED-549: Ethernet to DIO 8 Analog Inputs + Serial Gateway

ED560

ED-560: Ethernet to DIO 4 Analog Outputs + Serial Gateway

ED582

ED-582: Ethernet to 4 RTD Inputs + Serial Gateway

ED588

ED-588: Ethernet to DIO 8 Digital Inputs and 8 Digital Outputs + Serial Gateway

ED593

ED-593: Ethernet to 8 Thermocouple Inputs + Serial Gateway

EDDevice

Base class for all Brainboxes Ethernet Remote IO devices (part numbers starting "ED-XXX"). Provides access to digital and analog IO lines, event-driven monitoring, and device management.

ES246

Brainboxes ES-246 1 Port RS232 Ethernet to Serial Adapter

ES257

Brainboxes ES-257 2 Port RS232 Ethernet to Serial Adapter

ES279

Brainboxes ES-279 8 Port RS232 Ethernet to Serial Adapter

ES313

Brainboxes ES-313 2 Port RS422/485 Ethernet to Serial Adapter

ES320

Brainboxes ES-320 1 Port RS422/485 Ethernet to Serial Adapter

ES346

Brainboxes ES-346 4 Port RS422/485 Ethernet to Serial Adapter

ES357

Brainboxes ES-357 1 Port RS232 and 1 Port RS422/485 Ethernet to Serial Adapter

ES413

Brainboxes ES-413 2 Port RS422/485 PoE Ethernet to Serial Adapter

ES420

Brainboxes ES-420 1 Port RS422/485 PoE Ethernet to Serial Adapter

ES446

Brainboxes ES-446 1 Port RS232 PoE Ethernet to Serial Adapter

ES457

Brainboxes ES-457 2 Port RS232 PoE Ethernet to Serial Adapter

ES511

Brainboxes ES-511 1 Port RS232/422/485 Industrial Ethernet to Serial Adapter

ES522

Brainboxes ES-522 2 Port RS232/422/485 Industrial Ethernet to Serial Adapter

ES551

Brainboxes ES-551 1 Port RS232/422/485 Isolated Industrial Ethernet to Serial Adapter

ES571

Brainboxes ES-571 1 Port RS232/422/485 Industrial Ethernet to Serial Adapter + Switch

ES701

Brainboxes ES-701 4 Port RS232 Ethernet to Serial Adapter

ES842

Brainboxes ES-842 8 Port RS422/485 Ethernet to Serial Adapter

ESDevice

Base class for Brainboxes Ethernet-to-Serial devices (part numbers starting "ES-XXX"). Provides network-accessible serial ports via the Brainboxes.IO.ESDevice.Ports collection.

ExtensionMethods

Cast IEnumerable<IOLine> to IOList so that we can easy add and remove events from the list

IOLine

Represents a single IO line (digital or analog, input or output) on a Brainboxes Brainboxes.IO.EDDevice. Access IO lines via the Brainboxes.IO.EDDevice.Inputs, Brainboxes.IO.EDDevice.Outputs, or Brainboxes.IO.EDDevice.IOLines collections.

IOList<T>

List to hold any number of IOLines. Provides convenience methods for register events to all lines in the list and setting values of all outputs

ModbusTCPProtocol

Implementation of Brainboxes.IO.IIOProtocol using the Modbus TCP binary protocol. Used for ED-series devices on TCP port 502.

Protocol

Abstract base class for all Brainboxes communication protocols. Manages the underlying Brainboxes.IO.Protocol.Stream used for command/response communication.

SerialConnection

A connection to a Brainboxes device via a direct COM/serial port.

TCPConnection

A TCP/IP connection to a Brainboxes device over Ethernet. This is the most common connection type for both ED-series (Remote IO) and ES-series (Ethernet to Serial) devices.

Interfaces

IConnection

Interface describing a connection to a Brainboxes device.

IDevice<C, P>

Interface to a Brainboxes Device

IEDDevice

Remote Ethernet IO interface These devices use a command response protocol, almost every command sent to the device receives a response

IESDevice

Interface to Brainboxes Device with an Ethernet to serial port(s)

IIOProtocol

Defines the command interface for Brainboxes Remote IO devices (ED-series). Provides methods for reading and writing digital and analog IO lines, managing input counters and latches, and configuring device settings.

IProtocol

Base interface for all communication protocols used by Brainboxes devices. A protocol defines how commands are formatted, sent over the underlying Brainboxes.IO.IProtocol.Stream, and how responses are parsed.

ISerialProtocol

Protocol interface for Brainboxes Ethernet-to-Serial devices (ES-series). Provides encoding-aware send/receive methods for text-based serial communication. Implements System.ICloneable so that each Brainboxes.IO.BBSerialPort on a multi-port device gets its own protocol instance with independent state.

Enums

AIOChangeTypes

A type of change which can occur to a Analog IOLine

AnalogDataFormat

Specifies the data format for analog line readings from Brainboxes ED-series analog devices (e.g. Brainboxes.IO.ED549, Brainboxes.IO.ED560).

BBSerialPortType

The type of Serial Port

CounterMode

Specifies the bit width of the digital input counter on Brainboxes ED-series devices.

IOChangeTypes

A type of change which can occur to a Digital IOLine

IODirection

IODirection either input or output, for lines which can be both input and output the flags can be combined e.g. IODirection.Input | IODirection.Output

IOType

The type of IOLine

TemperatureUnit

Specifies the unit of measurement for temperature readings from Brainboxes thermocouple and RTD devices (Brainboxes.IO.ED582, Brainboxes.IO.ED593).

Delegates

AIOLineChangedEventHandler

When the status of 1 or more Analog IO lines change on a device within a polling internal be notified of the lines for which there is a change: TYPES OF EVENT: DELTA: When the line has changed more than the specified delta since the previous sampled value TARGET: When the line has changed to go above or below the specified target since the previous sampled value TARGET RANGE: When the line has changed to either enter the delta range of the target value or exit the delta range of the target value since the previous sampled value

ConnectionStatusChangedEventHandler

When the status of the connection changes this event is raised e.g. when IsConnected changes from false to true or when IsAvailable changes:

  • for example for a TCPConnection if the IP address is goes from online to offline
  • or for example for a SerialConnection when the COM name is no longer present or in use by another program

DeviceStatusChangedEventHandler<C, P>

When the status of the devices' connection changes

IOLineChangedEventHandler

When the status of an IO line changes, this can happen in 1 of 6 ways: ALL TYPES OF LINE: (1) the previous sampled value was 0 and the current sampled value is 1, RISING EDGE (2) the previous sampled value was 1 and the current sampled value is 0, FALLING EDGE ONLY INPUT LINES: (3) the previous sampled value was 1 and the current sampled value is 1, but between the 2 samplings the low latch has triggered which means the line has gone from 1 to 0 and back to 1 again, LATCHED (includes falling and rising edge) (4) the previous sampled value was 0 and the current sampled value is 0, but between the 2 samplings the high latch has triggered which means the line has gone from 0 to 1 and back to 0 again, LATCHED (includes rising and falling edge) ONLY OUTPUT LINES: (5) When the line is set changing it from a 0 to a 1, RISING EDGE (6) When the line is set changing it from a 1 to a 0, FALLING EDGE

IOLinesChangedEventHandler

When the status of 1 or more IO lines change on a device within a polling interval be notified of all the lines for which there is a change: ALL TYPES OF LINE: (1) the previous sampled value was 0 and the current sampled value is 1, RISING EDGE (2) the previous sampled value was 1 and the current sampled value is 0, FALLING EDGE ONLY INPUT LINES: (3) the previous sampled value was 1 and the current sampled value is 1, but between the 2 samplings the low latch has triggered which means the line has gone from 1 to 0 and back to 1 again, LATCHED (includes falling and rising edge) (4) the previous sampled value was 0 and the current sampled value is 0, but between the 2 samplings the high latch has triggered which means the line has gone from 0 to 1 and back to 0 again, LATCHED (includes rising and falling edge) ONLY OUTPUT LINES: (5) When the line is set changing it from a 0 to a 1, RISING EDGE (6) When the line is set changing it from a 1 to a 0, FALLING EDGE