Brightsign Object Reference Manual (FW 5.1) Manuel d'utilisateur Page 296

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 341
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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")
Vue de la page 295
1 2 ... 291 292 293 294 295 296 297 298 299 300 301 ... 340 341

Commentaires sur ces manuels

Pas de commentaire