Legrand / Raritan / Server Technology Xerus™ PDU JSON-RPC API
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
serial::SerialPort Interface Reference

Interface describing a physical serial port and the devices which can be attached to it. More...

import"SerialPort.idl";

Classes

struct  MetaData
 (Static) meta data containing port properties More...
 
struct  ModemAddedEvent
 Event emitted when a modem is connected. More...
 
struct  ModemEvent
 Event emitted when the modem connection state changes. More...
 
struct  ModemRemovedEvent
 Event emitted when a modem is disconnected. More...
 
struct  Settings
 Port settings. More...
 
struct  State
 Structure holding information about the current state of the port. More...
 

Public Types

enum  PortState { CONSOLE , ANALOGMODEM , GSMMODEM , DISCONNECTED }
 Possible states the port can be in at a given time. More...
 
enum  DetectionType { AUTOMATIC , FORCE_CONSOLE , FORCE_ANALOGMODEM , FORCE_GSMMODEM }
 Device type the port shall be looking for. More...
 
enum  BaudRate {
  BR1200 , BR2400 , BR4800 , BR9600 ,
  BR19200 , BR38400 , BR57600 , BR115200
}
 Possible baud rates. More...
 

Public Member Functions

MetaData getMetaData ()
 Get port meta data. More...
 
Settings getSettings ()
 Get current settings. More...
 
int setSettings (in Settings settings)
 Set settings. More...
 
State getState ()
 Get current port state. More...
 
Object getModem ()
 Get modem connected to port. More...
 

Public Attributes

constant int SUCCESS = 0
 Error codes. More...
 
constant int ERR_INVALID_VALUE = 1
 Invalid arguments.
 

Detailed Description

Interface describing a physical serial port and the devices which can be attached to it.

Member Enumeration Documentation

◆ BaudRate

Possible baud rates.

Enumerator
BR1200 

1.200 kbit/s

BR2400 

2.400 kbit/s

BR4800 

4.800 kbit/s

BR9600 

9.600 kbit/s

BR19200 

19::200 kbit/s

BR38400 

38::400 kbit/s

BR57600 

57::600 kbit/s

BR115200 

115::200 kbit/s

◆ DetectionType

Device type the port shall be looking for.

Enumerator
AUTOMATIC 

Try to automatically determine the connected device.

FORCE_CONSOLE 

Always assume a console (terminal) is connected.

FORCE_ANALOGMODEM 

Always assume an analog modem is connected.

FORCE_GSMMODEM 

Always assume a GSM modem is connected.

◆ PortState

Possible states the port can be in at a given time.

Enumerator
CONSOLE 

The console application is running on the port.

ANALOGMODEM 

An analog modem is attached to the port.

GSMMODEM 

A GSM modem is attached to the port.

DISCONNECTED 

No device matching the configured mode is detected.

Member Function Documentation

◆ getMetaData()

MetaData serial::SerialPort::getMetaData ( )

Get port meta data.

Returns
– Meta data

◆ getModem()

Object serial::SerialPort::getModem ( )

Get modem connected to port.

Returns
– an instance of the connected modem (either AnalogModem or GsmModem)

◆ getSettings()

Settings serial::SerialPort::getSettings ( )

Get current settings.

Returns
Settings

◆ getState()

State serial::SerialPort::getState ( )

Get current port state.

Returns
– Port state

◆ setSettings()

int serial::SerialPort::setSettings ( in Settings  settings)

Set settings.

Parameters
settings– new settings
Returns
SUCCESS – on success
ERR_INVALID_VALUE – if any passed value was invalid

Member Data Documentation

◆ SUCCESS

constant int serial::SerialPort::SUCCESS = 0

Error codes.

No error


The documentation for this interface was generated from the following file: