public abstract class JSONEncodeDecode
extends java.lang.Object
Constructor and Description |
---|
JSONEncodeDecode() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
alarmToJSON(AlarmValues alarmValues,
java.lang.String timeStamp)
Encode an alarm report as a JSON message.
|
static SecsFormat |
currentValue(GemHostModel.GemValueVariable vidValue)
Return a valid SecsFormat representing the value in the provided value object.
|
static java.util.Map<java.lang.String,java.lang.String> |
decodeDVVALs(java.lang.String jsonStr)
Decode the given string as a SecsFormat00
{ "values":[{ dvid:WaferCount, dvval:15 }, { dvid:23456, dvval:\"Hello World\" }] }
|
static java.util.Map<java.lang.String,SecsFormat> |
decodeMessage(java.lang.String jsonStr)
Decode the given string as a JSON Message format, eg.
|
static SecsFormat |
decodeSecsFormat(JSONObject jsonObject) |
static SecsFormat00 |
decodeSecsFormat00(java.lang.String jsonStr)
Decode the given string as a SecsFormat00
|
static java.lang.String |
eventMessageToJSON(GemToolModelSnapshot.GemReportVariable ceidVariable,
java.util.List<ReportValues> reportValues,
java.lang.String timeStamp)
Encode an event message to JSON.
|
static java.lang.String |
reportToJSON(ReportValues rptidVariable,
java.lang.String timeStamp)
Encode a report to a JSON Object.
|
static java.lang.String |
secsFormat00ToJSON(SecsFormat00 secsFormat00)
Encode a SecsFormat00 to a JSON Object.
|
static java.lang.String |
secsFormatToJSON(SecsFormat secsFormat)
Encode a SecsFormat to a JSON Object.
|
static java.lang.String |
secsFormatType(SecsFormat secsFormat)
Return a string representing the type of the SecsFormat.
|
static java.lang.String |
traceToJSON(GemHostModel.GemTraceVariable traceVariable,
java.util.List<GemHostModel.GemValueVariable> vidValues,
java.lang.String timeStamp)
Encode a trace to a JSON Object.
|
public static java.lang.String alarmToJSON(AlarmValues alarmValues, java.lang.String timeStamp)
rptidVariable
- the report variable that is being encoded to JSONtimeStamp
- the date/time in the format "yyyy-MM-dd HH:mm:ss.zzz". If this variable is null it will not be included in the JSONpublic static SecsFormat currentValue(GemHostModel.GemValueVariable vidValue)
vidValue
- the value object from which the SecsFormat value will be extractedpublic static java.util.Map<java.lang.String,java.lang.String> decodeDVVALs(java.lang.String jsonStr) throws VIBUpdateFailedException
jsonString
- the string representing the map of dvid and dvvalsVIBUpdateFailedException
public static java.util.Map<java.lang.String,SecsFormat> decodeMessage(java.lang.String jsonStr) throws VIBUpdateFailedException
jsonString
- the string representing the map of dvid and dvvalsVIBUpdateFailedException
public static SecsFormat decodeSecsFormat(JSONObject jsonObject) throws VIBUpdateFailedException
VIBUpdateFailedException
public static SecsFormat00 decodeSecsFormat00(java.lang.String jsonStr) throws VIBUpdateFailedException
jsonString
- the string representing the SecsFormat00VIBUpdateFailedException
public static java.lang.String eventMessageToJSON(GemToolModelSnapshot.GemReportVariable ceidVariable, java.util.List<ReportValues> reportValues, java.lang.String timeStamp)
rptidVariable
- the report variable that is being encoded to JSONtimeStamp
- the date/time in the format "yyyy-MM-dd HH:mm:ss.zzz". If this variable is null it will not be included in the JSONpublic static java.lang.String reportToJSON(ReportValues rptidVariable, java.lang.String timeStamp)
rptidVariable
- the report variable that is being encoded to JSONtimeStamp
- the date/time in the format "yyyy-MM-dd HH:mm:ss.zzz". If this variable is null it will not be included in the JSONpublic static java.lang.String secsFormat00ToJSON(SecsFormat00 secsFormat00)
public static java.lang.String secsFormatToJSON(SecsFormat secsFormat)
public static java.lang.String secsFormatType(SecsFormat secsFormat)
secsFormat
- the instance from which the type will be derived.public static java.lang.String traceToJSON(GemHostModel.GemTraceVariable traceVariable, java.util.List<GemHostModel.GemValueVariable> vidValues, java.lang.String timeStamp)
traceVariable
- the trace variable that is being encoded to JSONvidValues
- the values from the trace data messagetimeStamp
- the date/time in the format "yyyy-MM-dd HH:mm:ss.zzz". If this variable is null it will not be included in the JSONCopyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.