com.esf.net.udpserver.service
Interface IUdpServerService


public interface IUdpServerService

The IUdpServerService is used to give a remote network UDP client access to a serial port or a local serial port device the ability to send data to a remote UDP listening port.

Author:
john.lujan

Field Summary
static java.lang.String DATATBITS_5
           
static java.lang.String DATATBITS_6
           
static java.lang.String DATATBITS_7
           
static java.lang.String DATATBITS_8
           
static java.lang.String PARALLEL_LP_DRIVER
           
static java.lang.String PARALLEL_USB_LP_DRIVER
           
static java.lang.String PARITY_EVEN
           
static java.lang.String PARITY_MARK
           
static java.lang.String PARITY_NONE
           
static java.lang.String PARITY_ODD
           
static java.lang.String PARITY_SPACE
           
static java.lang.String SERIAL_CUSTOM_DRIVER
           
static java.lang.String SERIAL_LINUX_DRIVER
           
static java.lang.String SERIAL_TO_UDP
           
static java.lang.String SERIAL_USB_DRIVER
           
static java.lang.String SERIAL_VIRTUALPAIR_DRIVER
           
static java.lang.String SERVICE_NAME
          Reports the class name representing this interface.
static java.lang.String STOPBITS_1
           
static java.lang.String STOPBITS_2
           
static java.lang.String UDP_MASTER
           
static java.lang.String UDP_SLAVE
           
static java.lang.String UDP_TO_SERIAL
           
 
Method Summary
 void changeUdpServerBufferSize(int UdpServId, int BufferSize)
          This method modifies the BufferSize for a previously created UdpSever
 void changeUdpServerDemarkationMsec(int UdpServId, int DemarkationMsec)
          This method modifies the DemarkationMsec time limit of a previously created UdpServer.
 void changeUdpServerLocalAddress(int UdpServId, java.lang.String LocalAddress)
          This method modifies the TCP/IP dotted notation PeerAddress of a previously created UdpServer.
 void changeUdpServerOperation(int UdpServId, java.lang.String Operation)
          This method modifies the Operation mode of a previously created UdpServer.
 void changeUdpServerParallelPortDeviceDriver(int UdpServerId, int ParallPortId, java.lang.String DeviceDriver)
          This method modifies the Device driver used in a previously created UdpServer.
 void changeUdpServerParallelPortEndDeviceIndex(int UdpServerId, int ParallPortId, int EndDeviceIndex)
          This method modifies the EndDeviceIndex of parallel port for a previously created UdpServer.
 void changeUdpServerPeerAddress(int UdpServId, java.lang.String PeerAddress)
          This method modifies the TCP/IP dotted notation PeerAddress of a previously created UdpServer.
 void changeUdpServerPrimaryIpPort(int UdpServId, int PrimaryIpPort)
          This method modifies the PrimaryIpPort of a previously created UdpServer.
 void changeUdpServerSecondaryIpPort(int UdpServId, int SecondaryIpPort)
          This method modifies the SecondaryIpPort of a previously created UdpServer.
 int createUdpServer(java.lang.String sPeerAddress, int iPrimaryIpPort, java.lang.String LocalIpAddress, int iSecondaryIpPort, java.lang.String sOperation, int iDemarkationMsec, int iBufferSize)
          Configure operating parameters for UDP Server minus the end device(s) parameters which use another method
 int createUdpServerParallelPort(int iUdpServerId, java.lang.String sDeviceDriver, int iEndDeviceIndex)
          This method adds a parallel port to the UdpServer.
 int createUdpServerSerialPort(int iUdpServerId, java.lang.String sDeviceDriver, int iEndDeviceIndex, int iBaudRate, java.lang.String sParity, java.lang.String sStopBits, java.lang.String sDataBits, int iWarmUpMSec, int iWarmDownMSec, boolean fCancelEchoChars)
          This method adds a serial port to the UdpServer.
 void deleteUdpServerEndDevice(int iUdpServerId, int iEndDeviceIndex)
          This method will eliminate one of the attached end devices that was created for the selected (iUdpServerId) UdpServers.
 int getUdpServerBufferSize(int UdpServId)
          This method returns the BufferSize for a previously created UdpSever
 int getUdpServerCount()
          Get the current count of configured UDP Servers without guessing
 int getUdpServerDemarkationMsec(int UdpServId)
          This method returns the DemarkationMsec time limit of a previously created UdpServer.
 int getUdpServerEndDeviceCount(int iUdpServerId)
          This method will return the count of end devices added to a select UdpServer
 java.lang.String[] getUdpServerEndDeviceNames(int iUdpServerId)
          This function returns an array of Strings.
 java.lang.String getUdpServerLocalAddress(int UdpServId)
          This method returns the TCP/IP dotted notation PeerAddress of a previously created UdpServer.
 java.lang.String getUdpServerOperation(int UdpServId)
          This method returns the Operation mode of a previously created UdpServer.
 java.lang.String getUdpServerParallelPortDeviceDriver(int UdpServerId, int ParallPortId)
          This method returns the Device driver used in a previously created UdpServer.
 int getUdpServerParallelPortEndDeviceIndex(int UdpServerId, int ParallPortId)
          This method returns the EndDeviceIndex of parallel port for a previously created UdpServer.
 java.lang.String getUdpServerPeerAddress(int UdpServId)
          This method returns the TCP/IP dotted notation PeerAddress of a previously created UdpServer.
 int getUdpServerPrimaryIpPort(int UdpServId)
          This method returns the PrimaryIpPort of a previously created UdpServer.
 int getUdpServerSecondaryIpPort(int UdpServId)
          This method returns the SecondaryIpPort of a previously created UdpServer.
 void startUdpServerInstance(int iUdpServerId)
          This method will attempt to start a new instance of UdpServer using the appropriate configuration parameters.
 void stopUdpServerInstance(int iUdpServerId)
          This method will attempt to stop a previously running instance of UdpServer.
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
Reports the class name representing this interface.


SERIAL_TO_UDP

public static final java.lang.String SERIAL_TO_UDP
See Also:
Constant Field Values

UDP_TO_SERIAL

public static final java.lang.String UDP_TO_SERIAL
See Also:
Constant Field Values

UDP_MASTER

public static final java.lang.String UDP_MASTER
See Also:
Constant Field Values

UDP_SLAVE

public static final java.lang.String UDP_SLAVE
See Also:
Constant Field Values

SERIAL_LINUX_DRIVER

public static final java.lang.String SERIAL_LINUX_DRIVER
See Also:
Constant Field Values

SERIAL_CUSTOM_DRIVER

public static final java.lang.String SERIAL_CUSTOM_DRIVER
See Also:
Constant Field Values

SERIAL_VIRTUALPAIR_DRIVER

public static final java.lang.String SERIAL_VIRTUALPAIR_DRIVER
See Also:
Constant Field Values

SERIAL_USB_DRIVER

public static final java.lang.String SERIAL_USB_DRIVER
See Also:
Constant Field Values

PARALLEL_LP_DRIVER

public static final java.lang.String PARALLEL_LP_DRIVER
See Also:
Constant Field Values

PARALLEL_USB_LP_DRIVER

public static final java.lang.String PARALLEL_USB_LP_DRIVER
See Also:
Constant Field Values

PARITY_NONE

public static final java.lang.String PARITY_NONE
See Also:
Constant Field Values

PARITY_EVEN

public static final java.lang.String PARITY_EVEN
See Also:
Constant Field Values

PARITY_ODD

public static final java.lang.String PARITY_ODD
See Also:
Constant Field Values

PARITY_MARK

public static final java.lang.String PARITY_MARK
See Also:
Constant Field Values

PARITY_SPACE

public static final java.lang.String PARITY_SPACE
See Also:
Constant Field Values

STOPBITS_1

public static final java.lang.String STOPBITS_1
See Also:
Constant Field Values

STOPBITS_2

public static final java.lang.String STOPBITS_2
See Also:
Constant Field Values

DATATBITS_5

public static final java.lang.String DATATBITS_5
See Also:
Constant Field Values

DATATBITS_6

public static final java.lang.String DATATBITS_6
See Also:
Constant Field Values

DATATBITS_7

public static final java.lang.String DATATBITS_7
See Also:
Constant Field Values

DATATBITS_8

public static final java.lang.String DATATBITS_8
See Also:
Constant Field Values
Method Detail

getUdpServerCount

public int getUdpServerCount()
Get the current count of configured UDP Servers without guessing

Returns:
int iNumber of UdpServers configured

createUdpServer

public int createUdpServer(java.lang.String sPeerAddress,
                           int iPrimaryIpPort,
                           java.lang.String LocalIpAddress,
                           int iSecondaryIpPort,
                           java.lang.String sOperation,
                           int iDemarkationMsec,
                           int iBufferSize)
                    throws java.lang.Exception
Configure operating parameters for UDP Server minus the end device(s) parameters which use another method

Parameters:
sPeerAddress - In UDP_TO_SERIAL or UDP_SLAVE mode this parameter is used to bind() to the listen socket. A value of 0.0.0.0 would listen for any clients UDP packets. A value of 192.168.1.5 would only listen for packets from 192.168.1.5. In SERIAL_TO_UDP or UDP_MASTER mode this parameter is use to create the sendto() socket.
iPrimaryIpPort - In UDP_TO_SERIAL or UDP_SLAVE mode this parameter is used to bind() to the listen socket. In SERIAL_TO_UDP or UDP_MASTER mode this parameter is used to create sendto() socket.
LocalIpAddress - If Secondary port is not zero this this is the IP address used as the Source address of the outbound UDP packet
iSecondaryIpPort - In UDP_TO_SERIAL mode this parameter is not used. In UDP_SLAVE mode if this parameter is not zero then it is used as the port to forwarded serial packets at the last Clients IP Address. If set to zero then the packets are returned to the same IP Port that the client used in its source port of the UDP packet. In SERIAL_TO_UDP or UDP_MASTER mode if this value is not zero then the UDP packets source port is overridden to iSecondaryIpPort. If this value is zero then the source port will be set to 12345 + iUdpServerId.
sOperation - Use the service.UDP_TO_SERIAL to send packets from the network port to the serial port(s). Use the service.SERIAL_TO_UDP to send packets from the serial port(s) to the network port. Use the service.UDP_MASTER when the ESF system is a UDP Master so packets are originated on the serial port and the ESF system waits on UDP Packets as replies. Use the service.UDP_SLAVE when the ESF system is a UDP Slave so packets are originated on the network port and the ESF wait on serial packets as replies to go back to the network master.
iDemarkationMsec - This is used to determine when to stop building a payload of end device bytes and forward any previously received bytes to the TCP client in milliseconds.
iBufferSize - This is the maximum number of bytes that are to received from either the Client or the end device. If the buffer gets full then it is immediately returned to the other side of the UdpServer.
Returns:
int iUdpServerId This is the index to reference the object created by this configuration.
Throws:
java.lang.Exception

changeUdpServerPeerAddress

public void changeUdpServerPeerAddress(int UdpServId,
                                       java.lang.String PeerAddress)
                                throws java.lang.Exception
This method modifies the TCP/IP dotted notation PeerAddress of a previously created UdpServer.

Parameters:
UdpServId - The index value returned by createUdpServer().
PeerAddress - In UDP_TO_SERIAL or UDP_SLAVE mode this parameter is used to bind() to the listen socket. A value of 0.0.0.0 would listen for any clients UDP packets. A value of 192.168.1.5 would only listen for packets from 192.168.1.5. In SERIAL_TO_UDP or UDP_MASTER mode this parameter is use to create the sendto() socket.
Throws:
java.lang.Exception

changeUdpServerLocalAddress

public void changeUdpServerLocalAddress(int UdpServId,
                                        java.lang.String LocalAddress)
                                 throws java.lang.Exception
This method modifies the TCP/IP dotted notation PeerAddress of a previously created UdpServer.

Parameters:
UdpServId - The index value returned by createUdpServer().
LocalAddress - If the Secondary IP Port is not zero then this is the IP Address placed into the outbound UDP packet's 'source address'.
Throws:
java.lang.Exception

changeUdpServerPrimaryIpPort

public void changeUdpServerPrimaryIpPort(int UdpServId,
                                         int PrimaryIpPort)
                                  throws java.lang.Exception
This method modifies the PrimaryIpPort of a previously created UdpServer.

Parameters:
UdpServId - The index value returned by createUdpServer().
PrimaryIpPort - In UDP_TO_SERIAL or UDP_SLAVE mode this parameter is used to bind() to the listen socket. In SERIAL_TO_UDP or UDP_MASTER mode this parameter is used to create sendto() socket.
Throws:
java.lang.Exception

changeUdpServerSecondaryIpPort

public void changeUdpServerSecondaryIpPort(int UdpServId,
                                           int SecondaryIpPort)
                                    throws java.lang.Exception
This method modifies the SecondaryIpPort of a previously created UdpServer.

Parameters:
UdpServId - The index value returned by createUdpServer().
SecondaryIpPort - In UDP_TO_SERIAL mode this parameter is not used. In UDP_SLAVE mode if this parameter is not zero then it is used as the port to forwarded serial packets at the last Clients IP Address. If set to zero then the packets are returned to the same IP Port that the client used in its source port of the UDP packet. In SERIAL_TO_UDP or UDP_MASTER mode if this value is not zero then the UDP packets source port is overridden to iSecondaryIpPort. If this value is zero then the source port will be set to 12345 + iUdpServerId.
Throws:
java.lang.Exception

changeUdpServerOperation

public void changeUdpServerOperation(int UdpServId,
                                     java.lang.String Operation)
                              throws java.lang.Exception
This method modifies the Operation mode of a previously created UdpServer.

Parameters:
UdpServId - The index value returned by createUdpServer().
Operation - Use the service.UDP_TO_SERIAL to send packets from the network port to the serial port(s). Use the service.SERIAL_TO_UDP to send packets from the serial port(s) to the network port. Use the service.UDP_MASTER when the ESF system is a UDP Master so packets are originated on the serial port and the ESF system waits on UDP Packets as replies. Use the service.UDP_SLAVE when the ESF system is a UDP Slave so packets are originated on the network port and the ESF wait on serial packets as replies to go back to the network master.
Throws:
java.lang.Exception

changeUdpServerDemarkationMsec

public void changeUdpServerDemarkationMsec(int UdpServId,
                                           int DemarkationMsec)
                                    throws java.lang.Exception
This method modifies the DemarkationMsec time limit of a previously created UdpServer.

Parameters:
UdpServId - The index value returned by createUdpServer().
DemarkationMsec - This is used to determine when to stop building a payload of end device bytes and forward any previously received bytes to the TCP client in milliseconds.
Throws:
java.lang.Exception

changeUdpServerBufferSize

public void changeUdpServerBufferSize(int UdpServId,
                                      int BufferSize)
                               throws java.lang.Exception
This method modifies the BufferSize for a previously created UdpSever

Parameters:
UdpServId - The index value returned by createUdpServer().
BufferSize - This is the maximum number of bytes that are to received from either the Client or the end device. If the buffer gets full then it is immediately returned to the other side of the UdpServer.
Throws:
java.lang.Exception

getUdpServerPeerAddress

public java.lang.String getUdpServerPeerAddress(int UdpServId)
                                         throws java.lang.Exception
This method returns the TCP/IP dotted notation PeerAddress of a previously created UdpServer.

Parameters:
UdpServId - The index value returned by createUdpServer().
Returns:
PeerAddress In UDP_TO_SERIAL or UDP_SLAVE mode this parameter is used to bind() to the listen socket. A value of 0.0.0.0 would listen for any clients UDP packets. A value of 192.168.1.5 would only listen for packets from 192.168.1.5. In SERIAL_TO_UDP or UDP_MASTER mode this parameter is use to create the sendto() socket.
Throws:
java.lang.Exception

getUdpServerLocalAddress

public java.lang.String getUdpServerLocalAddress(int UdpServId)
                                          throws java.lang.Exception
This method returns the TCP/IP dotted notation PeerAddress of a previously created UdpServer.

Parameters:
UdpServId - The index value returned by createUdpServer().
Returns:
LocalAddress If the secondary IP Port is not zero then this is the 'source address' used in out bound UDP packets.
Throws:
java.lang.Exception

getUdpServerPrimaryIpPort

public int getUdpServerPrimaryIpPort(int UdpServId)
                              throws java.lang.Exception
This method returns the PrimaryIpPort of a previously created UdpServer.

Parameters:
UdpServId - The index value returned by createUdpServer().
Returns:
PrimaryIpPort In UDP_TO_SERIAL or UDP_SLAVE mode this parameter is used to bind() to the listen socket. In SERIAL_TO_UDP or UDP_MASTER mode this parameter is used to create sendto() socket.
Throws:
java.lang.Exception

getUdpServerSecondaryIpPort

public int getUdpServerSecondaryIpPort(int UdpServId)
                                throws java.lang.Exception
This method returns the SecondaryIpPort of a previously created UdpServer.

Parameters:
UdpServId - The index value returned by createUdpServer().
Returns:
SecondaryIpPort In UDP_TO_SERIAL mode this parameter is not used. In UDP_SLAVE mode if this parameter is not zero then it is used as the port to forwarded serial packets at the last Clients IP Address. If set to zero then the packets are returned to the same IP Port that the client used in its source port of the UDP packet. In SERIAL_TO_UDP or UDP_MASTER mode if this value is not zero then the UDP packets source port is overridden to iSecondaryIpPort. If this value is zero then the source port will be set to 12345 + iUdpServerId.
Throws:
java.lang.Exception

getUdpServerOperation

public java.lang.String getUdpServerOperation(int UdpServId)
                                       throws java.lang.Exception
This method returns the Operation mode of a previously created UdpServer.

Parameters:
UdpServId - The index value returned by createUdpServer().
Returns:
Operation "UDP_TO_SERIAL" to send packets from the network port to the serial port(s). "SERIAL_TO_UDP" to send packets from the serial port(s) to the network port. "UDP_MASTER" when the ESF system is a UDP Master so packets are originated on the serial port and the ESF system waits on UDP Packets as replies. "UDP_SLAVE" when the ESF system is a UDP Slave so packets are originated on the network port and the ESF wait on serial packets as replies to go back to the network master.
Throws:
java.lang.Exception

getUdpServerDemarkationMsec

public int getUdpServerDemarkationMsec(int UdpServId)
                                throws java.lang.Exception
This method returns the DemarkationMsec time limit of a previously created UdpServer.

Parameters:
UdpServId - The index value returned by createUdpServer().
Returns:
DemarkationMsec This is used to determine when to stop building a payload of end device bytes and forward any previously received bytes to the TCP client in milliseconds.
Throws:
java.lang.Exception

getUdpServerBufferSize

public int getUdpServerBufferSize(int UdpServId)
                           throws java.lang.Exception
This method returns the BufferSize for a previously created UdpSever

Parameters:
UdpServId - The index value returned by createUdpServer().
Returns:
BufferSize This is the maximum number of bytes that are to received from either the Client or the end device. If the buffer gets full then it is immediately returned to the other side of the UdpServer.
Throws:
java.lang.Exception

createUdpServerSerialPort

public int createUdpServerSerialPort(int iUdpServerId,
                                     java.lang.String sDeviceDriver,
                                     int iEndDeviceIndex,
                                     int iBaudRate,
                                     java.lang.String sParity,
                                     java.lang.String sStopBits,
                                     java.lang.String sDataBits,
                                     int iWarmUpMSec,
                                     int iWarmDownMSec,
                                     boolean fCancelEchoChars)
                              throws java.lang.Exception
This method adds a serial port to the UdpServer. More than one serial port can be added.

Parameters:
iUdpServerId - This should be on of the Id's that is returned by the createUdpServer() method. This value ranges from 0 to 'last UdpServerId'
sDeviceDriver - This is the device driver used for the end device. Use service.SERIAL_LINUX_DRIVER if you want to use the native Linux serial port (e.g. /dev/ttyS[0-12]). Use service.SERIAL_CUSTOM_DRIVER if you want to use the EuroTech custom serial driver (e.g. /dev/acscomm[0-36]) Use service.SERIAL_USB_DRIVER if you want to use the native Linux driver usb serial ports (e.g. /dev/ttyUSB[0-8]).
iEndDeviceIndex - This is the index that is appended to the root device name such as /dev/ttyS? /dev/acscomm? or in the case of virtual serial ports add 64 to /dev/acscomm and the pairs would be [0,1], [2,3], [4,5] etc...
iBaudRate - This is the baud rate to be used on the serial device. Valid entries are... 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, and 115200.
sParity - This is the parity to be used on the serial port. Valid entries could be... service.PARITY_NONE, service.PARITY_EVEN, service.PARITY_ODD, service.PARITY_MARK, service.PARITY_SPACE, and that's all folks.
sStopBits - This is the number of stop bits to be used on the serial device and can only be... service.STOPBITS_1 or service.STOPBITS_2.
sDataBits - This is the number of data bits in a character for the end devices. Valid entries... service.DATABITS_5 or service.DATABITS_6 or service.DATABITS_7 or service.DATABITS_8
iWarmUpMSec - This is the number of milliseconds used after raising RTS before sending a payload to the serial port.. If set to 0 then nothing is sent until CTS is true. If it is set to -1 then no handshaking is used on the serial port. Only available when using the SERIAL_CUSTOM_DRIVER.
iWarmDownMSec - This is the number of milliseconds to delay lowering RTS after the last byte leaves the serial port. Only available with the SERIAL_CUSTOM_DRIVER.
fCancelEchoChars - This will configure the serial port to not accept any bytes while it is transmitting. Only available with SERIAL_CUSTOM_DRIVER.
Returns:
SerialPortID This value is used in the deleteUdpServerEndDevice() method.
Throws:
java.lang.Exception

createUdpServerParallelPort

public int createUdpServerParallelPort(int iUdpServerId,
                                       java.lang.String sDeviceDriver,
                                       int iEndDeviceIndex)
                                throws java.lang.Exception
This method adds a parallel port to the UdpServer. Only one parallel port can be added.

Parameters:
iUdpServerId - This should be one of the Id's that is returned by the createUdpServer() method. This value ranges from 0 to 'last UdpServer Id'
sDeviceDriver - This is the device driver used for the end device. Use service.PARALLEL_LP_DRIVER is you want to use the native Linux parallel port driver (e.g. /dev/lp[0-3]). Use the service.PARALLEL_USB_LP_DRIVER if you want to user the native Linux usb parallel port driver (e.g. /dev/usb/lp[0-3]).
iEndDeviceIndex - This is the index that is appended to the root device name such as.. /dev/lp? /dev/usb/lp? ...
Returns:
ParallelPortId This value is required by the deleteUdpServerEndDevice() method.
Throws:
java.lang.Exception

changeUdpServerParallelPortDeviceDriver

public void changeUdpServerParallelPortDeviceDriver(int UdpServerId,
                                                    int ParallPortId,
                                                    java.lang.String DeviceDriver)
                                             throws java.lang.Exception
This method modifies the Device driver used in a previously created UdpServer.

Parameters:
UdpServerId - This should be one of the Id's that is returned by the createUdpServer() method. This value ranges from 0 to 'last UdpServer Id'
ParallPortId - This should be one of the ParallelPortIds returned by createUdpServerParallelPort()
DeviceDriver - This is the device driver used for the end device. Use service.PARALLEL_LP_DRIVER is you want to use the native Linux parallel port driver (e.g. /dev/lp[0-3]). Use the service.PARALLEL_USB_LP_DRIVER if you want to user the native Linux usb parallel port driver (e.g. /dev/usb/lp[0-3]).
Throws:
java.lang.Exception

changeUdpServerParallelPortEndDeviceIndex

public void changeUdpServerParallelPortEndDeviceIndex(int UdpServerId,
                                                      int ParallPortId,
                                                      int EndDeviceIndex)
                                               throws java.lang.Exception
This method modifies the EndDeviceIndex of parallel port for a previously created UdpServer.

Parameters:
UdpServerId - This should be one of the Id's that is returned by the createUdpServer() method. This value ranges from 0 to 'last UdpServer Id'
ParallPortId - This should be one of the ParallelPortIds returned by createUdpServerParallelPort()
EndDeviceIndex - This is the index that is appended to the root device name such as.. /dev/lp? /dev/usb/lp? ...
Throws:
java.lang.Exception

getUdpServerParallelPortDeviceDriver

public java.lang.String getUdpServerParallelPortDeviceDriver(int UdpServerId,
                                                             int ParallPortId)
                                                      throws java.lang.Exception
This method returns the Device driver used in a previously created UdpServer.

Parameters:
UdpServerId - This should be one of the Id's that is returned by the createUdpServer() method. This value ranges from 0 to 'last UdpServer Id'
ParallPortId - This should be one of the ParallelPortIds returned by createUdpServerParallelPort()
Returns:
DeviceDriver This is the device driver used for the end device. "PARALLEL_LP_DRIVER" is uses the native Linux parallel "PARALLEL_USB_LP_DRIVER" uses the native Linux usb parallel port driver (e.g. /dev/usb/lp[0-3]).
Throws:
java.lang.Exception

getUdpServerParallelPortEndDeviceIndex

public int getUdpServerParallelPortEndDeviceIndex(int UdpServerId,
                                                  int ParallPortId)
                                           throws java.lang.Exception
This method returns the EndDeviceIndex of parallel port for a previously created UdpServer.

Parameters:
UdpServerId - This should be one of the Id's that is returned by the createUdpServer() method. This value ranges from 0 to 'last UdpServer Id'
ParallPortId - This should be one of the ParallelPortIds returned by createUdpServerParallelPort()
Returns:
EndDeviceIndex This is the index that is appended to the root device name such as.. /dev/lp? /dev/usb/lp? ...
Throws:
java.lang.Exception

getUdpServerEndDeviceCount

public int getUdpServerEndDeviceCount(int iUdpServerId)
                               throws java.lang.Exception
This method will return the count of end devices added to a select UdpServer

Parameters:
iUdpServerId - This is the index (or handle) that is returned by the createUdpServer() method.
Returns:
number of UdpServer end devices
Throws:
java.lang.Exception

getUdpServerEndDeviceNames

public java.lang.String[] getUdpServerEndDeviceNames(int iUdpServerId)
                                              throws java.lang.Exception
This function returns an array of Strings. The name(s) of each end device will be in the list such as... "/dev/ttyS1" and/or "/dev/usb/lp0" and/or "/dev/acscomm11"

Parameters:
iUdpServerId - This is the index (or handle if you like) that is returned by the createUdpServer() method.
Returns:
String[] name of serial device(s)
Throws:
java.lang.Exception

deleteUdpServerEndDevice

public void deleteUdpServerEndDevice(int iUdpServerId,
                                     int iEndDeviceIndex)
                              throws java.lang.Exception
This method will eliminate one of the attached end devices that was created for the selected (iUdpServerId) UdpServers.

Parameters:
iUdpServerId - The index for a selected UdpServer.
iEndDeviceIndex - The index for a selected 'end device'.
Throws:
java.lang.Exception

startUdpServerInstance

public void startUdpServerInstance(int iUdpServerId)
                            throws java.lang.Exception
This method will attempt to start a new instance of UdpServer using the appropriate configuration parameters.

Parameters:
iUdpServerId - This is the handle that was returned by the createUdpServer() method.
Throws:
java.lang.Exception

stopUdpServerInstance

public void stopUdpServerInstance(int iUdpServerId)
                           throws java.lang.Exception
This method will attempt to stop a previously running instance of UdpServer.

Parameters:
iUdpServerId - This is the handle that was returned by the createUdpServer() method.
Throws:
java.lang.Exception


Copyright © 2009 Eurotech Inc. All rights reserved.