User manual

Microgate MicroGraph LED User Manual Page 80 of 88
4.1 CONSTRUCTOR
The class must be instanced giving the constructor 3 main parameters (which set the relative
properties):
- Technology (LED | PIXEL)
- Model (MicroTab | MicroGRAPH)
- CommunicationProtocol ( Serial | Ethernet | Wifi | Fileout)
For all three mnemonic enums are available
Depending on the chosen communication protocol, the relevant properties for communication
must be set immediately afterwards:
SERIAL
ETHERNET
WIFI
FILEOUT
PortName (e.g.
'COM1')
BaudRate (e.g.
9600)
EthIpAddress
('192.168.0.123')
EthPortNumber
(21967)
WifiIpAddress
('192.168.0.124')
WifiPortNumber
(21968)
FileNameOut
('c:\sample.txt')
4.2 CONNECTION
To establish the connection with the display board, you can use the OpenConnection()
method and, if necessary, check that the connection has been established with the property
Connected. Similarly, CloseConnection() closes the connection. The class implements the
interface IDisposable, therefore, to free and close all resources use the method Dispose()
or the statement using (C#).
In any case, it is possible to avoid the explicit opening of the serial port or the TCP socket, carried
out upon first use of a primitive or command.