1
0
Fork 0

m2ua: Move the comments into the comment pragma, fix parse issue

#endif is not a good entry in a file. Move the comments into the
method and class as this is the only way we can express it for
other dialects.
This commit is contained in:
Holger Hans Peter Freyther 2013-02-17 13:41:30 +01:00
parent c24ccc9db6
commit 5a061d9bef
1 changed files with 25 additions and 26 deletions

51
M2UA.st
View File

@ -18,6 +18,12 @@
Object subclass: UAConstants [
"
"
<category: 'OsmoNetwork-M2UA'>
<comment: 'I hold the mapping from M2UA constants to their
numeric representation. The following classes are defined:
Management (MGMT) Message [IUA/UA/M3UA/SUA]
Transfer Messages [M3UA]
SS7 Signalling Network Management (SSNM) Messages [M3UA/SUA]
@ -29,11 +35,7 @@ Object subclass: UAConstants [
Connection-Oriented Messages [SUA]
Routing Key Management (RKM) Messages (M3UA)
Interface Identifier Management (IIM) Messages (UA)
"
<category: 'OsmoNetwork-M2UA'>
<comment: 'I hold the mapping from M2UA constants to their
numeric representation.'>
'>
UAConstants class >> clsMgmt [ <category: 'constants'> ^ 0 ]
UAConstants class >> clsTrans [ <category: 'constants'> ^ 1 ]
@ -287,7 +289,24 @@ Object subclass: M2UAMSG [
<category: 'OsmoNetwork-M2UA'>
<comment: 'I can parse a M2UA message from the wire, allow you
to see the class, type and include tags.'>
to see the class, type and include tags. In C the structure will
look like this:
struct m2ua_common_hdr {
uint8_t version;
uint8_t spare;
uint8_t msg_class;
uint8_t msg_type;
uint32_t msg_length;
uint8_t data[0];
} __attribute__((packed));
struct m2ua_parameter_hdr {
uint16_t tag;
uint16_t len;
uint8_t data[0];
} __attribute__((packed));
'>
M2UAMSG class >> parseFrom: aMsg [
<category: 'parsing'>
@ -393,24 +412,4 @@ Object subclass: M2UAMSG [
aMsg putByteArray: tag_data.
]
]
"
struct m2ua_common_hdr {
uint8_t version;
uint8_t spare;
uint8_t msg_class;
uint8_t msg_type;
uint32_t msg_length;
uint8_t data[0];
} __attribute__((packed));
struct m2ua_parameter_hdr {
uint16_t tag;
uint16_t len;
uint8_t data[0];
} __attribute__((packed));
"
#endif