EasyManuals Logo

Moxa Technologies NPort 5250A User Manual

Moxa Technologies NPort 5250A
194 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #165 background imageLoading...
Page #165 background image
NPort 5000 Series User Manual
165
MxNPortAPI Function Groups
The supported functions in this API are listed below:
Port Control
Input/Output
Port Status Inquiry
Miscellaneous
open
close
setIoctlMode
setFlowCtrl
setBaud
setRTS
setDTR
flush
read
write
getBaud
getFlowCtrl
getIoctlMode
getLineStatus
getModemStatus
getOQueue
setBreak
Example Program
To make sure this API is workable with the device server on an Android platform, see the example program
below:
Thread thread = new Thread()
{
@Override
public void run() {
/* Enumerate and initialize NPorts on system */
List<MxNPort> NPortList = MxNPortService.getNPortInfoList();
if(NPortList!=null){
MxNPort.IoctlMode mode = new MxNPort.IoctlMode();
mode.baudRate = 38400;
mode.dataBits = MxNPort.DATA_BITS_8;
mode.parity = MxNPort.PARITY_NONE;
mode.stopBits = MxNPort.STOP_BITS_1;
MxNPort mxNPort = NPortList.get(0); /* Get first NPort device */
try {
byte[] buf = {'H','e','l','l','o',' ','W','o','r','l','d'};
mxNPort.open(); /*open port*/
mxNPort.setIoctlMode(mode); /*serial parameters setting*/
mxNPort.write(buf, buf.length); /*write data*/
mxNPort.close(); /*close port*/
} catch (MxException e){
/*Error handling*/
}
}
}
};
thread.start();

Table of Contents

Other manuals for Moxa Technologies NPort 5250A

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Moxa Technologies NPort 5250A and is the answer not in the manual?

Moxa Technologies NPort 5250A Specifications

General IconGeneral
CertificationCE, FCC EN 55022 Class A, FCC Part 15 Subpart B Class A EN 55024 EN 61000-4-4 EN 61000-4-5
Serial interface typeRS-232/422/485
Serial ports quantity1
Supported network protocolsICMP, IPv4, TCP, UDP, DHCP, BOOTP, Telnet, DNS, SNMP V1, HTTP, SMTP, IGMP V1/2
Storage temperature (T-T)-40 - 75 °C
Operating temperature (T-T)0 - 60 °C
Operating relative humidity (H-H)5 - 95 %
SafetyUL 60950-1, EN 60950-1
Weight and Dimensions IconWeight and Dimensions
Weight340 g
Dimensions (WxDxH)77 x 111 x 26 mm

Related product manuals