Brightsign Object Reference Manual (FW 5.1) Bedienungsanleitung Seite 296

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 341
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 295
288
roSequenceMatcher
This object is used to send roSequenceMatchEvent events when the specified byte sequence patterns are matched.
Once a pattern has been matched and the event has been posted, all contributing bytes are discarded. As a result, if one
pattern is a prefix of another pattern, then the second, longer pattern will never be matched by the object.
Interfaces: ifStreamReceiveObserver, ifSequenceMatcher
The ifSequenceMatcher interface provides the following:
SetMessagePort(a As Object): Specifies the message port where roSequenceMatchEvent objects will be
posted.
Add(pattern As Object, user_data As Object) As Boolean: Adds a pattern to be matched by the
roSequenceMatcher object instance. The pattern should be specified as an object that is convertible to a byte
sequence (e.g. roByteArray, roString). For the user data, pass the object that should be returned if the specified
pattern is matched.
Example
Function FromHex(hex as String) as Object
bytes = CreateObject("roByteArray")
bytes.FromHexString(hex)
return bytes
End Function
Sub Main()
serial = CreateObject("roSerialPort", 1, 115200)
mp = CreateObject("roMessagePort")
Seitenansicht 295
1 2 ... 291 292 293 294 295 296 297 298 299 300 301 ... 340 341

Kommentare zu diesen Handbüchern

Keine Kommentare