gurux.terminal.java

gurux.terminal.java package is used to communicate with terminal (modem) connection.

License

License

Categories

Categories

MINA Net Networking
GroupId

GroupId

org.gurux
ArtifactId

ArtifactId

gurux.terminal
Last Version

Last Version

1.0.21
Release Date

Release Date

Type

Type

jar
Description

Description

gurux.terminal.java
gurux.terminal.java package is used to communicate with terminal (modem) connection.
Project URL

Project URL

http://www.gurux.org
Project Organization

Project Organization

Gurux Ltd.
Source Code Management

Source Code Management

https://github.com/gurux/gurux.terminal.java

Download gurux.terminal

How to add to project

<!-- https://jarcasting.com/artifacts/org.gurux/gurux.terminal/ -->
<dependency>
    <groupId>org.gurux</groupId>
    <artifactId>gurux.terminal</artifactId>
    <version>1.0.21</version>
</dependency>
// https://jarcasting.com/artifacts/org.gurux/gurux.terminal/
implementation 'org.gurux:gurux.terminal:1.0.21'
// https://jarcasting.com/artifacts/org.gurux/gurux.terminal/
implementation ("org.gurux:gurux.terminal:1.0.21")
'org.gurux:gurux.terminal:jar:1.0.21'
<dependency org="org.gurux" name="gurux.terminal" rev="1.0.21">
  <artifact name="gurux.terminal" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.gurux', module='gurux.terminal', version='1.0.21')
)
libraryDependencies += "org.gurux" % "gurux.terminal" % "1.0.21"
[org.gurux/gurux.terminal "1.0.21"]

Dependencies

compile (1)

Group / Artifact Type Version
org.gurux : gurux.common jar 1.0.17

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

See An Gurux for an overview.

Join the Gurux Community or follow @Gurux for project updates.

Open Source GXTerminal media component, made by Gurux Ltd, is a part of GXMedias set of media components, which programming interfaces help you implement communication using modem communication.

Our media components also support the following connection types: network and Serial Port.

For more info check out Gurux.

We are updating documentation on Gurux web page.

If you have problems you can ask your questions in Gurux Forum.

Build

If you want to build example you need Nuget package manager for Visual Studio. You can get it here: https://visualstudiogallery.msdn.microsoft.com/27077b70-9dad-4c64-adcf-c7cf6bc9970c

Simple example

Before use you must set following settings:

  • PhoneNumber
  • PortName
  • BaudRate
  • DataBits
  • Parity
  • StopBits

It is also good to listen following events:

  • OnError
  • OnReceived
  • OnMediaStateChange
GXTerminal cl = new GXTerminal();
cl.PhoneNumber = "Phone number";
cl.PortName = "COM1";
cl.BaudRate = 9600;
cl.DataBits = 8;
cl.Parity = System.IO.Ports.Parity.None;
cl.StopBits = System.IO.Ports.StopBits.One;
cl.Open();

Data is send with send command:

cl.Send("Hello World!");

In default mode received data is coming as asynchronously from OnReceived event.

cl.OnReceived += new ReceivedEventHandler(this.OnReceived);

Data can be send as syncronous if needed:

lock (cl.Synchronous)
{
    string reply = "";
    ReceiveParameters<string> p = new ReceiveParameters<string>()
    //ReceiveParameters<byte[]> p = new ReceiveParameters<byte[]>()
    {
       //Wait time tells how long data is waited.
       WaitTime = 1000,
       //Eop tells End Of Packet charachter.
       Eop = '\r'
    };
    cl.Send("Hello World!", null);
    if (gxNet1.Receive(p))
    {
	reply = Convert.ToString(p.Reply);
    }
}
org.gurux

Gurux Ltd

Versions

Version
1.0.21
1.0.20
1.0.19
1.0.18
1.0.17
1.0.16
1.0.15
1.0.14
1.0.13
1.0.12
1.0.10
1.0.8
1.0.7
1.0.6
1.0.5
1.0.3