diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-11-27 13:38:40 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-11-27 14:00:26 +0100 |
commit | afd83ce44567fbf50ddf50f934b5e4ec668a724b (patch) | |
tree | 7b5034d8dd1e67858cc8c053be166cc14bc90970 /Messages.st | |
parent | 117b78df17f6dd8682c25ae8cf9083f8367dae3f (diff) |
Messages: Introduce a IEBase base class and share it for GSM48 and GSM0808
Diffstat (limited to 'Messages.st')
-rw-r--r-- | Messages.st | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Messages.st b/Messages.st index 13f9b54..4bb616d 100644 --- a/Messages.st +++ b/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 | |