|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.eurotech.framework.protocol.pcn.Pcn1001SnpChannel
public class Pcn1001SnpChannel
Defines SNP channel class for PCN-1001 passenger counter
| Field Summary | |
|---|---|
static String |
PROTOCOL_CONNECTION_TYPE_ETHER_TCP
|
static String |
PROTOCOL_CONNECTION_TYPE_SERIAL
|
| Fields inherited from interface com.eurotech.framework.protocol.pcn.Pcn1001SnpChannelService |
|---|
SERVICE_NAME, snpNotification |
| Constructor Summary | |
|---|---|
Pcn1001SnpChannel(org.osgi.service.io.ConnectionFactory connFactory,
Properties connectionConfig,
org.osgi.framework.BundleContext bundleContext,
Object user)
Pcn1001SnpChannel constructor. |
|
| Method Summary | |
|---|---|
void |
addUser(Object user)
Adds a user to the list of channel users. |
void |
close()
Closes PCN-1001 SNP channel |
int |
getBaudRate()
Reports baud rate. |
String |
getDevName()
Reports name of the serial device. |
String |
getDevProductID()
Reports device product ID |
String |
getDevVendorID()
Reports device vendor ID |
int |
getFlowControl()
Reports flow control mode. |
int |
getNumberDataBits()
Reports number of data bits. |
int |
getNumberStopBits()
Reports number of stop bits. |
int |
getParity()
Reports parity. |
int |
getUsageCount()
Reports usage count. |
String[] |
getUsers()
Reports list of channel users. |
boolean |
isDeviceSupported()
Reports if serial device is supported by this implementation. |
SnpMessage |
sendCommand(SnpMessage snpCmd,
int tout)
Sends SNP command to the passenger counter |
void |
setUsageCount(int usageCount)
Sets usage count. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PROTOCOL_CONNECTION_TYPE_SERIAL
public static final String PROTOCOL_CONNECTION_TYPE_ETHER_TCP
| Constructor Detail |
|---|
public Pcn1001SnpChannel(org.osgi.service.io.ConnectionFactory connFactory,
Properties connectionConfig,
org.osgi.framework.BundleContext bundleContext,
Object user)
throws EsfException
devName - - name of serial device as StringdeviceVendorID - - device vendor ID as StringdeviceProductID - - device product ID as Stringbaudrate - - baud rate as intnumDataBits - - number of data bits as intnumStopBits - - number of stop bits as intparity - - parity as intflowcontrol - - type of flow control as intbundleContext - - bundle context as BundleContextuser - - object that is registering with this channel as ObjectesfLoggerService - - ESF logger service as IEsfLoggerService
EsfException| Method Detail |
|---|
public String getDevVendorID()
Pcn1001SnpChannelService
getDevVendorID in interface Pcn1001SnpChannelServiceStringpublic String getDevProductID()
Pcn1001SnpChannelService
getDevProductID in interface Pcn1001SnpChannelServiceStringpublic int getUsageCount()
Pcn1001SnpChannelService
getUsageCount in interface Pcn1001SnpChannelServiceintpublic String[] getUsers()
Pcn1001SnpChannelService
getUsers in interface Pcn1001SnpChannelServiceString[]public void addUser(Object user)
Pcn1001SnpChannelService
addUser in interface Pcn1001SnpChannelServiceuser - - user to add as Objectpublic void setUsageCount(int usageCount)
usageCount - - usage count as intpublic String getDevName()
Pcn1001SnpChannelService
getDevName in interface Pcn1001SnpChannelServiceStringpublic int getBaudRate()
Pcn1001SnpChannelService
getBaudRate in interface Pcn1001SnpChannelServiceintpublic int getNumberDataBits()
Pcn1001SnpChannelService
getNumberDataBits in interface Pcn1001SnpChannelServiceintpublic int getNumberStopBits()
Pcn1001SnpChannelService
getNumberStopBits in interface Pcn1001SnpChannelServiceintpublic int getParity()
Pcn1001SnpChannelService
getParity in interface Pcn1001SnpChannelServiceintpublic int getFlowControl()
Pcn1001SnpChannelService
getFlowControl in interface Pcn1001SnpChannelServiceint
public SnpMessage sendCommand(SnpMessage snpCmd,
int tout)
throws EsfException
Pcn1001SnpChannelService
sendCommand in interface Pcn1001SnpChannelServicesnpCmd - - SNP command as SnpMessage
EsfExceptionpublic boolean isDeviceSupported()
Pcn1001SnpChannelService
isDeviceSupported in interface Pcn1001SnpChannelServiceboolean
public void close()
throws EsfException
EsfException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||