Appendix F – Embedded Control Characters - 18
Appendix F – Embedded Control Characters
When using WaveWare mode it is not necessary to make use of the
<
SUB
>
control character. Since WaveWare
mode does not use the <CR> control character it is only necessary to hit carriage return on your keyboard to have it
show up on the pager display.
To embed a control character in a TAP mode paging message however, it is necessary include a
<
SUB
>
control
character followed by an offset version of the control character you want to embed. You offset the control character
by adding 40 HEX to the control character, to make the character printable. Adding 40 HEX to Carriage
Return
gives you M. Adding 40 HEX to Line
Feed gives you J. The character combination of
<
SUB
>
M causes a Carriage
Return control character to be embedded in the encoded paging message, while
<
SUB
>
J causes a Line Feed control
character to be embedded. The
<
SUB
>
character needs to be passed to the
WaveWare Paging System
as a HEX
character.
In the WaveWare Paging Encoder Setup software, you can embed a Carriage Return by entering
<
CR
>
in the
message body, and embed a Line Feed character by entering
<
LF
>
in the message body. The use of the
<
SUB
>
character will be done by the software.
In the Microsoft Visual Basic programming language, you can use the following code example to define the
embedded control character string to be delivered through the serial port to the paging system. In this example, we
are embedding only the Carriage Return control character:
DIM CarriageReturnString As String,
DIM MessageLine1 As String
DIM MessageLine2 As String
DIM TXString As String
CarriageReturnString = Chr(26) & "M"
LineFeedString = Chr(26) & "J"
MessageLine1 = "Line 1 of test message"
MessageLine2 = "Line 2 of test message"
TXString = MessageLine1 & CarriageReturnString & MessageLine2
form1.MSComm1.Output = TXString