Hi Fox,
Anyone is welcome to my domain! I'm just also here....
It is possible there are unresolved issues in the serial server socket, but I was not able to clearly reproduce. My test is this configuration:
{
"dataSources":[
{
"xid":"DS_ef61c883-191d-43af-95a3-d4d0f61c46b6",
"name":"Serial",
"enabled":true,
"type":"SERIAL",
"alarmLevels":{
"POINT_READ_PATTERN_MISMATCH_EVENT":"URGENT",
"POINT_WRITE_EXCEPTION":"URGENT",
"DATA_SOURCE_EXCEPTION":"URGENT",
"POINT_READ_EXCEPTION":"URGENT"
},
"purgeType":"YEARS",
"baudRate":115200,
"commPortId":"COMMO",
"dataBits":8,
"flowControlIn":0,
"flowControlOut":0,
"hex":false,
"ioLogFileSizeMBytes":1.0,
"logIO":true,
"maxHistoricalIOLogs":1,
"maxMessageSize":1024,
"messageRegex":"().*",
"messageTerminator":";",
"parity":0,
"pointIdentifierIndex":1,
"readTimeout":1000,
"retries":1,
"stopBits":1,
"useTerminator":false,
"editPermission":"",
"purgeOverride":false,
"purgePeriod":1
}
],
"dataPoints":[
{
"xid":"DP_fb5749cc-5b0d-4345-a8a7-0c7686ab8e9c",
"name":"Catchall",
"enabled":true,
"loggingType":"ON_CHANGE",
"intervalLoggingPeriodType":"MINUTES",
"intervalLoggingType":"INSTANT",
"purgeType":"YEARS",
"pointLocator":{
"dataType":"ALPHANUMERIC",
"pointIdentifier":"",
"valueIndex":0,
"valueRegex":"(?:.|\\r|\\n)+"
},
"eventDetectors":[
],
"plotType":"STEP",
"rollup":"NONE",
"unit":"",
"templateXid":"Alphanumeric_Default",
"chartColour":"",
"chartRenderer":{
"type":"TABLE",
"limit":10
},
"dataSourceXid":"DS_ef61c883-191d-43af-95a3-d4d0f61c46b6",
"defaultCacheSize":1,
"deviceName":"Serial",
"discardExtremeValues":false,
"discardHighLimit":1.7976931348623157E308,
"discardLowLimit":-1.7976931348623157E308,
"intervalLoggingPeriod":15,
"intervalLoggingSampleWindowSize":0,
"overrideIntervalLoggingSamples":false,
"preventSetExtremeValues":false,
"purgeOverride":false,
"purgePeriod":1,
"readPermission":"",
"setExtremeHighLimit":1.7976931348623157E308,
"setExtremeLowLimit":-1.7976931348623157E308,
"setPermission":"",
"tags":{
},
"textRenderer":{
"type":"PLAIN",
"useUnitAsSuffix":true,
"unit":"",
"renderedUnit":"",
"suffix":""
},
"tolerance":0.0
}
],
"virtualSerialPorts":[
{
"type":"SERIAL_SERVER_SOCKET_BRIDGE",
"bufferSize":4,
"port":1620,
"timeout":0,
"portName":"COMMO",
"xid":"VSP_640ff0e9-4e88-4129-8802-b10633cec732"
}
]
}
The other end of the connection was a simple nc localhost 1620
. I tested both staying connected and breaking the connection each time.
I did notice I got it in a state where the data point would appear to update but would have an empty value! Checking its history revealed it had two values at that time, one was the value I expected and one was a blank message. I resolved that issue by changing my point's regex from (?:.|\r|\n)*
to (?:.|\r|\n)+
You can see the buffer size is very small for the serial server socket bridge but it still worked for larger messages in my test, so long as they are smaller than the data source's maximum size.
Does that seem familiar? Might your point also be resetting to a blank value, but actually have the expected values in history?