Messages: Introduce a IEBase base class and share it for GSM48 and GSM0808
This commit is contained in:
parent
117b78df17
commit
afd83ce445
12
BSSMAP.st
12
BSSMAP.st
|
@ -1,4 +1,4 @@
|
|||
Object subclass: GSM0808IE [
|
||||
IEBase subclass: GSM0808IE [
|
||||
<category: 'osmo-message'>
|
||||
<comment: 'Base class of IEs for GSM0808'>
|
||||
|
||||
|
@ -6,16 +6,6 @@ Object subclass: GSM0808IE [
|
|||
"Return if this IE is a TLV or a TV"
|
||||
^ false
|
||||
]
|
||||
|
||||
type [
|
||||
"Go through the elementId of the class"
|
||||
^ self class elementId
|
||||
]
|
||||
|
||||
writeOn: aMsg [
|
||||
aMsg putByte: self class elementId.
|
||||
self writeOnDirect: aMsg.
|
||||
]
|
||||
]
|
||||
|
||||
Object subclass: GSM0808Helper [
|
||||
|
|
12
GSM48.st
12
GSM48.st
|
@ -4,18 +4,8 @@
|
|||
IEs for GSM48MSG
|
||||
"""
|
||||
|
||||
Object subclass: GSM48IE [
|
||||
IEBase subclass: GSM48IE [
|
||||
<comment: 'I am a Information Element for GSM48'>
|
||||
|
||||
writeOnDirect: aMsg [
|
||||
"This should be implemented by the subclass"
|
||||
self subclassResponsibility
|
||||
]
|
||||
|
||||
writeOn: aMsg [
|
||||
aMsg putByte: self class elementId.
|
||||
self writeOnDirect: aMsg.
|
||||
]
|
||||
]
|
||||
|
||||
GSM48IE subclass: GSM48SimpleData [
|
||||
|
|
20
Messages.st
20
Messages.st
|
@ -1,4 +1,24 @@
|
|||
"General IE based message handling"
|
||||
|
||||
Object subclass: IEBase [
|
||||
<comment: 'I am a base for IE types'>
|
||||
|
||||
type [
|
||||
"Go through the elementId of the class"
|
||||
^ self class elementId
|
||||
]
|
||||
|
||||
writeOnDirect: aMsg [
|
||||
"This should be implemented by the subclass"
|
||||
self subclassResponsibility
|
||||
]
|
||||
|
||||
writeOn: aMsg [
|
||||
aMsg putByte: self class elementId.
|
||||
self writeOnDirect: aMsg.
|
||||
]
|
||||
]
|
||||
|
||||
Object subclass: DataIE [
|
||||
| data |
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
<prereq>OsmoNetwork</prereq>
|
||||
<prereq>OsmoLogging</prereq>
|
||||
|
||||
<filein>Messages.st</filein>
|
||||
<filein>BSSAP.st</filein>
|
||||
<filein>BSSMAP.st</filein>
|
||||
<filein>Messages.st</filein>
|
||||
<filein>GSM48.st</filein>
|
||||
<filein>SCCPHandler.st</filein>
|
||||
<filein>TestPhone.st</filein>
|
||||
|
|
Reference in New Issue