rlsd | A lightweight , retro Linux-libre distro
kandi X-RAY | rlsd Summary
kandi X-RAY | rlsd Summary
RLSD, the Retro Linux-libre Software Distribution, is a small, "live" operating system with GNU/Linux-libre (and retro applications for the x86 and x86_64 architectures. It revives old hardware and the way computing used to be in the late 90’s. RLSD’s development follows the guidelines in the project manifest described in MANIFEST. RLSD consists of free software: software that respects the user’s freedom. RLSD is free to study, modify and share. To read more about free software, see For more information, see the project homepage (
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of rlsd
rlsd Key Features
rlsd Examples and Code Snippets
Community Discussions
Trending Discussions on rlsd
QUESTION
package deviceintegration;
import jssc.SerialPort;
import jssc.SerialPortEvent;
import jssc.SerialPortEventListener;
import jssc.SerialPortException;
/**
*
*
*/
public class SerialScaleDevice implements SerialPortEventListener {
private String m_sPortScale;
private SerialPort m_CommSerialPort;
private static final int SCALE_READY = 0;
private String m_dWeight;
private int m_iStatusScale;
/**
* Creates a new instance of SerialScaleDevice
*
* @param sPortPrinter
*/
public SerialScaleDevice(String sPortPrinter) {
m_sPortScale = sPortPrinter;
m_CommSerialPort = new SerialPort(m_sPortScale);
//
m_iStatusScale = SCALE_READY;
m_dWeight = "";
}
/**
*
* @return
*/
public String readWeight() {
synchronized (this) {
if (m_iStatusScale != SCALE_READY) {
try {
wait(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
if (m_iStatusScale != SCALE_READY) {
m_iStatusScale = SCALE_READY;
}
}
m_dWeight = "0.0";
read();
try {
wait(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
return m_dWeight;
}
}
private void read() {
try {
m_CommSerialPort.openPort();
m_CommSerialPort.setEventsMask(SerialPort.MASK_RXCHAR);
m_CommSerialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE);
m_CommSerialPort.setParams(SerialPort.BAUDRATE_9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
m_CommSerialPort.addEventListener(this);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* @param e
*/
public void serialEvent(SerialPortEvent event) {
// Determine type of event.
switch (event.getEventType()) {
case SerialPortEvent.BREAK:
case SerialPortEvent.CTS:
case SerialPortEvent.DSR:
case SerialPortEvent.ERR:
case SerialPortEvent.RING:
case SerialPortEvent.RLSD:
case SerialPortEvent.RXFLAG:
case SerialPortEvent.TXEMPTY:
break;
case SerialPortEvent.RXCHAR:
try {
Thread.sleep(200);
m_dWeight = new String (m_CommSerialPort.readBytes());
System.out.println("readBytes: " + m_dWeight);
} catch (InterruptedException e) {
e.printStackTrace();
} catch (SerialPortException e) {
e.printStackTrace();
}
break;
}
}
}
...ANSWER
Answered 2019-Dec-01 at 14:36I don't know the protocol of the device you are using, but it appears to send 12 bytes per message. <+-><9 digit hex>
. So, read 12 bytes at a time, and convert the hex to decimal.
So, first change
QUESTION
I'm looking for a way to develop a DCE (RS232) using Java for an existing legacy protocol which requires me to read the DTR pin status, and maintain control of the DSR and RLSD pins from my end. I went about trying to do this by using JSSC but it seems to have everything I would need to make the DTE side of things such as controlling DTR and picking up DSR events.
Currently, without any setup of the control lines, it seems to use a combination of DTR/DSR and RTS/CTS.
Is there a way for me, using Java, to control the reading of the DTR, and setting of the DSR,RLSD control lines?
...ANSWER
Answered 2018-Jan-26 at 01:00No answers but I figured it out. Simple answer is to develop as a DTE and use a null modem cable to be a DCE to the other end.
QUESTION
I'm trying to create a select statement adding days to the CURDATE, using the below code:
...ANSWER
Answered 2017-Dec-20 at 07:11Try below query:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install rlsd
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page