public abstract class VIBMessageBean extends PublishBean implements SecsDefinedMessage, MessageResponseInterface, java.lang.Cloneable
Modifier and Type | Class and Description |
---|---|
class |
VIBMessageBean.WaitForResponse
Called when the CreateReportsResponse message is received.
|
SimpleDataSource.NameEditorData
DataSource.Writable
Modifier and Type | Field and Description |
---|---|
static int |
ANY_CHANGE
Send the message on the whenever the value changes outside of the deadband.
|
static java.lang.String |
ERROR_STATUS_NAME
This datasource will be triggered if an error response is recieved to a message.
|
static int |
FALLING_EDGE
Only send the message on the FALLING edge.
|
boolean |
firstPublish
This is set for the first publish for each published item.
|
static boolean |
gemCompliant
Whether we are running with GEM compliance.
|
static java.lang.String |
GOOD_STATUS_NAME
This datasource will be triggered if a good response is recieved to a message.
|
static java.lang.String |
RESPONSE_STATUS_NAME
This is the name that we publish use to publish the received response.
|
static int |
RISING_EDGE
Only send the message on the RISING edge.
|
static java.lang.String |
SEND_MESSAGE_NAME
This is the name that we publish use to send the.
|
static boolean |
showThinking
Whether to show the logic of matching messages.
|
TransSecsController |
transSecsController
This is the transSecsController for this message bean.
|
cvsRev
UPDATE_DISPLAYED_VALUE, VALUE_INPUT
customTimer, EXPORT_READ_ONLY, EXPORT_READ_WRITE, NO_EXPORT, requiresSyncWrite, sharedTimer, syncWriteTimeout, timebase
autoSuspend, AUTOSUSPEND_DEFAULT, AUTOSUSPEND_NEVER, AUTOSUSPEND_NO_LISTENERS, AUTOSUSPEND_NO_LISTENERS_AND_NO_SOURCES, colorHi, colorHiHi, colorLo, colorLoLo, colorNormal, connectors, consoleLogger, currentColor, currentValue, debugLevel, DEFAULT_AUTOSUSPEND, dontConnect, gwtLog, hardSuspended, popupLogger, PRIMARYOUTPORTNAME, sendColors, stopped, suspended, timedPopupLogger, traceLogger, valueHi, valueHiHi, valueLo, valueLoLo
cvsRev
Constructor and Description |
---|
VIBMessageBean()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addValueChangedListener(java.lang.Object listener)
Creates a connector from the default outport of this server to the
method called "valueInput" of the provided object.
|
SecsFormat00 |
clearMessage(SecsFormat00 mainList)
If the message is bi-directional, receiving the message will populate all the lists in the message with data.
|
java.lang.Object |
clone()
Permit cloning of this instance so that we can test receiving without impacting the instance that is held by the controller.
|
abstract SecsMsg |
createMessage()
Create the secs message.
|
SecsMsg |
createMessage(boolean detailedLogging)
Available to be overridden by subclasses to create a detailed SML string for logging.
|
SecsMsg |
createMessageForDigitalTwin()
Create the secs message.
|
SecsMsg |
createMessageForDigitalTwin(boolean detailedLogging)
Create the secs message.
|
boolean |
equals(java.lang.Object obj)
Equals includes the name of the bean and the name of the controller.
|
boolean |
getConnectOnSend()
Returns connect on send.
|
java.lang.String |
getControllerName()
Returns the message port name.
|
int |
getControllerPort()
Returns the controller port.
|
abstract int |
getFunction()
Returns the function of this message.
|
int |
getHcack()
Used to determine if an autoresponse needs to be sent.
|
java.util.List<SecsFormat> |
getHostMessageErrorLists() |
java.lang.String |
getName()
This will return the name.
|
boolean |
getPeepOnly()
To take a look at the data in a message and then pass it on
to the host without handling it set snoop only.
|
DataSourceContainer |
getPublishedAccessorContainer()
Returns the container with the name of our controller.
|
SecsDefinedMessage |
getResponse()
Sets the response message by string
|
static VIBMessageBean |
getResponse(java.lang.String messageName)
Returns the response message by string
|
VIBMessageBean |
getResponseMessage()
Sets the response message by string.
|
java.lang.String |
getResponseMessageName()
Sets the response message by string.
|
SecsMsg |
getSecsMsg()
returns the raw secs message associated with this object.
|
abstract int |
getStream()
Returns the stream of this message.
|
int |
getTriggerEdge()
The edge that will trigger the message to be sent.
|
int |
hashCode()
The hashcode uses the name of the controller and the name of the bean.
|
void |
hostMessageError(java.lang.String cpname,
int cpack,
int hcack,
java.lang.String errorDescription)
Indicate that an error has occured in processing a host message and create the error list if appropriate.
|
boolean |
hostMessageParameterMatchError(SecsMsg hostMessage,
java.util.Set<java.lang.String> matched,
SecsFormat00 paramList,
java.util.List<java.lang.String> expected)
Indicate that an error has occured in processing a host message and create the error list if appropriate.
|
void |
init()
Add the event messages as CEIDs.
|
static boolean |
isGemCompliant() |
boolean |
isHandleAsHostMessage() |
boolean |
isHandleHostMessageErrors() |
static void |
logInfo(java.lang.String message)
Log information about the reception of messages.
|
void |
notifyReceive()
Update all listeners to indicate that the message has been received.
|
void |
println(java.lang.String s)
Prints out the provided string.
|
boolean |
processMessage(SecsMsg msg)
Process the response to the sent message - if any.
|
abstract boolean |
publishData(SecsMsg msg)
Publishs the data from unsolicted messages is they match an incoming message.
|
boolean |
receiveMessage(SecsMsg msg,
boolean doPublish)
Process the response to the sent message.
|
abstract boolean |
receiveMessage(SecsMsg msg,
boolean doPublish,
boolean logInfo)
Process the response to the sent message.
|
boolean |
receiveMessage(SecsMsg sm,
boolean doPublish,
boolean logInfo,
java.lang.StringBuilder sml)
Process the response to the sent message.
|
boolean |
receiveMessageForDigitalTwin(SecsMsg msg,
boolean doPublish,
boolean logInfo)
Process the response to the sent message.
|
void |
removeValueChangedListener(java.lang.Object listener)
Creates a connector from the default outport of this server to the
method called "valueInput" of the provided object.
|
static void |
resetAutoResponseTable() |
boolean |
responseReceived(int status,
SecsMsg primary,
SecsMsg response)
The MsgResponseInterface.
|
boolean |
sendErrorResponse(SecsMsg hostMessage,
boolean defaultReturn)
Send the S2F42 if appropriate.
|
SecsMsg |
sendMessage()
Send the message.
|
SecsMsg |
sendMessage(int deviceId)
Send the message.
|
void |
sendMessage(java.lang.Object delegate)
Sends the message and notify the delegate when the response is recevied.
|
void |
sendMessage(ValueChangedEvent newEvent)
This method will send the message.
|
<T extends VIBMessageBean> |
sendMessageAndWait()
Sends the message and waits for the response.
|
<T extends VIBMessageBean> |
sendMessageAndWait(int deviceId)
Sends the message and waits for the response.
|
void |
sendMessageFromOPC()
Send a message from an OPC server.
|
void |
setConnectOnSend(boolean connectOnSend)
Sets connect on send.
|
void |
setControllerName(java.lang.String controllerName)
Sets the controller name.
|
void |
setControllerPort(int controllerPort)
Sets the controller port.
|
static void |
setGemCompliant(boolean gemCompliant) |
void |
setHandleAsHostMessage(boolean handleAsHostMessage) |
void |
setHandleHostMessageErrors(boolean handleHostMessageErrors) |
void |
setHcack(int hcack)
Used in the generated code to set the variable.
|
void |
setHostMessageErrorLists(java.util.List<SecsFormat> hostMessageErrorLists) |
void |
setName(java.lang.String newName)
Set the name of this component.
|
void |
setPeepOnly(boolean peepOnly)
To take a look at the data in a message and then pass it on
to the host without handling it set snoop only.
|
static void |
setResponse(java.lang.String messageName,
VIBMessageBean message)
Sets the response message by string
|
void |
setSecsMsg(SecsMsg sm)
Sets the raw secs message associated with this object.
|
void |
setTriggerEdge(int triggerEdge)
The edge that will trigger the message to be sent.
|
void |
start()
This is the true constructor.
|
java.lang.String |
toJSONString()
Create a JSON String that represents the class.
|
java.lang.String |
toString()
Create a toString to be proud of...
|
addConnectionToDataSource, addConnectionToDevice, convertByteArray, convertFromSecsFormat00, convertSecsFormat, displayTimedPopup, getCurrentQualitySetting, getPrivateField, idTypeFromFormat, publish, publish, publish, publish, publish, publish, publish, publish, publish, publish, publish, publish, removeConnectionFromDevice, setCurrentQualitySetting
getDefaultQualityForLocation
getInPortNames, getStaticLocationFor, setBooleanValue, setBoolValue, setByteValue, setDoubleValue, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValue, valueChanged, valueInput
addConnector, addConnector, addDataSource, addPropertyChangeListener, addVetoableChangeListener, authenticatedClientRequest, clientRequest, clientResponse, destroy, determineSuspendedStatus, getClassLicenseManager, getContainer, getCustomTimer, getDataSource, getDataSources, getDisplayName, getExportCriteria, getExposeComponentConnections, getOutPortNames, getPullFromServers, getPushData, getPushName, getPushToServers, getServerListData, getTimebase, getTrace, isActive, isScreenLocal, refreshCurrentValue, removeConnector, removeDataSource, removePropertyChangeListener, removeVetoableChangeListener, requestSyncWrite, setAutoSuspend, setClassLicenseManager, setContainer, setCustomTimer, setDataSourceName, setExportCriteria, setExposeComponentConnections, setPullFromServers, setPushData, setPushName, setPushToServers, setScreenLocal, setServerListData, setTimebase, setTrace, setValueObject, stop, tick, VIBEvent
addVIBEventListener, checkScript, executeInScriptInternal, executeScript, executeScriptInternal, executeScriptInternal, getAutoSuspend, getBooleanValue, getBoolValue, getColorHi, getColorHiHi, getColorLo, getColorLoLo, getColorNormal, getConnectors, getConsoleLogger, getCurrentColor, getDataSourceName, getDoubleValue, getFloatValue, getGWTLogger, getIncomingValueObject, getInScript, getIntValue, getLongValue, getParent, getPopupLogger, getScript, getScriptEngine, getSendColors, getSources, getStringValue, getSyncWriteTimeout, getTimedPopupLogger, getTraceLogger, getValueHi, getValueHiHi, getValueLo, getValueLoLo, getValueObject, isHardSuspended, isRunning, isSendOnlyChangedValuesDefault, isSuspended, logException, logGWT, logGWT, logMessage, logTrace, n2sortConnectors, performScriptSubstitutions, popupMessage, post, removeConnector, removeVIBEventListener, replaceConnectors, scriptExtensionSubstition, setColorHi, setColorHiHi, setColorLo, setColorLoLo, setColorNormal, setConsoleLogger, setGWTLogger, setHardSuspended, setInScript, setParent, setPopupLogger, setScript, setSendColors, setSendOnlyChangedValuesDefault, setSyncWriteTimeout, setTimedPopupLogger, setTraceLogger, setValueHi, setValueHiHi, setValueLo, setValueLoLo, updateColor, updateListeners, updateListeners, updateListeners, whoAmI
public static final int ANY_CHANGE
public static final java.lang.String ERROR_STATUS_NAME
public static final int FALLING_EDGE
public boolean firstPublish
public static boolean gemCompliant
public static final java.lang.String GOOD_STATUS_NAME
public static final java.lang.String RESPONSE_STATUS_NAME
public static final int RISING_EDGE
public static final java.lang.String SEND_MESSAGE_NAME
public static boolean showThinking
public transient TransSecsController transSecsController
public VIBMessageBean()
public void addValueChangedListener(java.lang.Object listener)
addValueChangedListener
in class SimpleDataSource
listener
- the target of this serverpublic SecsFormat00 clearMessage(SecsFormat00 mainList)
mainList
- if the mainlist has content - populated by receiving this message - all SecsFormat00 associated with this message will be cleared. The mainList will also be cleared.public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public abstract SecsMsg createMessage()
createMessage
in interface SecsDefinedMessage
public SecsMsg createMessage(boolean detailedLogging)
detailedLogging
- true if a detailed SML logging string should be created and added to the messagecreateMessage()
public SecsMsg createMessageForDigitalTwin()
public SecsMsg createMessageForDigitalTwin(boolean detailedLogging)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean getConnectOnSend()
public java.lang.String getControllerName()
public int getControllerPort()
public abstract int getFunction()
getFunction
in interface SecsDefinedMessage
public int getHcack()
public java.util.List<SecsFormat> getHostMessageErrorLists()
public java.lang.String getName()
getName
in class SimpleDataSource
public boolean getPeepOnly()
public DataSourceContainer getPublishedAccessorContainer() throws BadParameterException
getPublishedAccessorContainer
in class PublishBean
BadParameterException
public SecsDefinedMessage getResponse()
getResponse
in interface SecsDefinedMessage
public static VIBMessageBean getResponse(java.lang.String messageName)
public VIBMessageBean getResponseMessage()
public java.lang.String getResponseMessageName()
public SecsMsg getSecsMsg()
getSecsMsg
in interface SecsDefinedMessage
public abstract int getStream()
getStream
in interface SecsDefinedMessage
public int getTriggerEdge()
public int hashCode()
hashCode
in class java.lang.Object
public void hostMessageError(java.lang.String cpname, int cpack, int hcack, java.lang.String errorDescription) throws java.lang.Exception
cpname
- the cpname associated with the errorcpack
- the error code.java.lang.Exception
public boolean hostMessageParameterMatchError(SecsMsg hostMessage, java.util.Set<java.lang.String> matched, SecsFormat00 paramList, java.util.List<java.lang.String> expected)
cpname
- the cpname associated with the errorcpack
- the error code.public void init() throws BadParameterException
init
in class DataSource
BadParameterException
public static boolean isGemCompliant()
public boolean isHandleAsHostMessage()
public boolean isHandleHostMessageErrors()
public static void logInfo(java.lang.String message)
public void notifyReceive()
public void println(java.lang.String s)
public boolean processMessage(SecsMsg msg)
processMessage
in interface SecsDefinedMessage
public abstract boolean publishData(SecsMsg msg)
publishData
in interface SecsDefinedMessage
public boolean receiveMessage(SecsMsg msg, boolean doPublish) throws SecsException
SecsException
public abstract boolean receiveMessage(SecsMsg msg, boolean doPublish, boolean logInfo) throws SecsException
SecsException
public boolean receiveMessage(SecsMsg sm, boolean doPublish, boolean logInfo, java.lang.StringBuilder sml) throws SecsException
SecsException
public boolean receiveMessageForDigitalTwin(SecsMsg msg, boolean doPublish, boolean logInfo) throws SecsException
SecsException
public void removeValueChangedListener(java.lang.Object listener)
removeValueChangedListener
in class SimpleDataSource
listener
- the target of this serverpublic static void resetAutoResponseTable()
public boolean responseReceived(int status, SecsMsg primary, SecsMsg response)
responseReceived
in interface MessageResponseInterface
public boolean sendErrorResponse(SecsMsg hostMessage, boolean defaultReturn)
hostMessage
- the host message that is being processed.defaultReturn
- returned if no message is sentpublic SecsMsg sendMessage() throws SecsException
sendMessage
in interface SecsDefinedMessage
SecsException
public SecsMsg sendMessage(int deviceId) throws SecsException
SecsException
public void sendMessage(java.lang.Object delegate) throws SecsException
SecsException
public void sendMessage(ValueChangedEvent newEvent) throws VIBUpdateFailedException
VIBUpdateFailedException
public <T extends VIBMessageBean> T sendMessageAndWait() throws SecsException
SecsException
public <T extends VIBMessageBean> T sendMessageAndWait(int deviceId) throws SecsException
SecsException
public void sendMessageFromOPC() throws java.lang.Exception
java.lang.Exception
public void setConnectOnSend(boolean connectOnSend)
public void setControllerName(java.lang.String controllerName)
public void setControllerPort(int controllerPort)
public static void setGemCompliant(boolean gemCompliant)
gemCompliant
- the gemCompliant to setpublic void setHandleAsHostMessage(boolean handleAsHostMessage)
handleAsHostMessage
- the handleAsHostMessage to setpublic void setHandleHostMessageErrors(boolean handleHostMessageErrors)
handleHostMessageErrors
- the handleHostMessageErrors to setpublic void setHcack(int hcack)
hcack
- the hcack to setpublic void setHostMessageErrorLists(java.util.List<SecsFormat> hostMessageErrorLists)
hostMessageErrorLists
- the hostMessageErrorLists to setpublic void setName(java.lang.String newName) throws BadParameterException
setName
in class SimpleDataSource
newName
- toolname.msgnameBadParameterException
- thrown if a component by the same name is already registered.SimpleDataSource.setName(java.lang.String)
public void setPeepOnly(boolean peepOnly)
public static void setResponse(java.lang.String messageName, VIBMessageBean message)
public void setSecsMsg(SecsMsg sm)
public void setTriggerEdge(int triggerEdge)
public void start() throws BadParameterException, VIBUpdateFailedException
start
in class SimpleDataSource
BadParameterException
VIBUpdateFailedException
public java.lang.String toJSONString()
public java.lang.String toString()
toString
in class Manipulator
Copyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.