25 lines
677 B
Smalltalk
25 lines
677 B
Smalltalk
![]() |
Object subclass: BSSAPHelper [
|
||
|
BSSAPHelper class >> msgManagemnt [ ^ 0 ]
|
||
|
BSSAPHelper class >> msgDtap [ ^ 1 ]
|
||
|
|
||
|
BSSAPHelper class >> prependManagement: aMsg [
|
||
|
"Prepent the BSSAP Management header"
|
||
|
| tmp |
|
||
|
|
||
|
tmp := OrderedCollection new.
|
||
|
tmp add: self msgManagemnt.
|
||
|
tmp add: aMsg size.
|
||
|
aMsg prependByteArray: tmp asByteArray.
|
||
|
]
|
||
|
|
||
|
BSSAPHelper class >> prependDTAP: aMsg dlci: sapi [
|
||
|
"Prepend the DTAP header"
|
||
|
| tmp |
|
||
|
tmp := OrderedCollection new.
|
||
|
tmp add: self msgDtap.
|
||
|
tmp add: sapi.
|
||
|
tmp add: aMsg size.
|
||
|
aMsg prependByteArray: tmp asByteArray.
|
||
|
]
|
||
|
]
|