|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 String
deviceVendorID
- - device vendor ID as String
deviceProductID
- - device product ID as String
baudrate
- - baud rate as int
numDataBits
- - number of data bits as int
numStopBits
- - number of stop bits as int
parity
- - parity as int
flowcontrol
- - type of flow control as int
bundleContext
- - bundle context as BundleContext
user
- - object that is registering with this channel as Object
esfLoggerService
- - ESF logger service as IEsfLoggerService
EsfException
Method Detail |
---|
public String getDevVendorID()
Pcn1001SnpChannelService
getDevVendorID
in interface Pcn1001SnpChannelService
String
public String getDevProductID()
Pcn1001SnpChannelService
getDevProductID
in interface Pcn1001SnpChannelService
String
public int getUsageCount()
Pcn1001SnpChannelService
getUsageCount
in interface Pcn1001SnpChannelService
int
public String[] getUsers()
Pcn1001SnpChannelService
getUsers
in interface Pcn1001SnpChannelService
String[]
public void addUser(Object user)
Pcn1001SnpChannelService
addUser
in interface Pcn1001SnpChannelService
user
- - user to add as Object
public void setUsageCount(int usageCount)
usageCount
- - usage count as int
public String getDevName()
Pcn1001SnpChannelService
getDevName
in interface Pcn1001SnpChannelService
String
public int getBaudRate()
Pcn1001SnpChannelService
getBaudRate
in interface Pcn1001SnpChannelService
int
public int getNumberDataBits()
Pcn1001SnpChannelService
getNumberDataBits
in interface Pcn1001SnpChannelService
int
public int getNumberStopBits()
Pcn1001SnpChannelService
getNumberStopBits
in interface Pcn1001SnpChannelService
int
public int getParity()
Pcn1001SnpChannelService
getParity
in interface Pcn1001SnpChannelService
int
public int getFlowControl()
Pcn1001SnpChannelService
getFlowControl
in interface Pcn1001SnpChannelService
int
public SnpMessage sendCommand(SnpMessage snpCmd, int tout) throws EsfException
Pcn1001SnpChannelService
sendCommand
in interface Pcn1001SnpChannelService
snpCmd
- - SNP command as SnpMessage
EsfException
public boolean isDeviceSupported()
Pcn1001SnpChannelService
isDeviceSupported
in interface Pcn1001SnpChannelService
boolean
public void close() throws EsfException
EsfException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |