diff options
Diffstat (limited to 'codec/attributes')
-rw-r--r-- | codec/attributes/SMPPAddressNumberingPlanIndicator.st | 84 | ||||
-rw-r--r-- | codec/attributes/SMPPAddressRange.st | 28 | ||||
-rw-r--r-- | codec/attributes/SMPPAddressTypeOfNumber.st | 70 | ||||
-rw-r--r-- | codec/attributes/SMPPInterfaceVersion.st | 39 | ||||
-rw-r--r-- | codec/attributes/SMPPOctetString.st | 41 | ||||
-rw-r--r-- | codec/attributes/SMPPPassword.st | 28 | ||||
-rw-r--r-- | codec/attributes/SMPPSystemId.st | 28 | ||||
-rw-r--r-- | codec/attributes/SMPPSystemType.st | 28 |
8 files changed, 346 insertions, 0 deletions
diff --git a/codec/attributes/SMPPAddressNumberingPlanIndicator.st b/codec/attributes/SMPPAddressNumberingPlanIndicator.st new file mode 100644 index 0000000..a623d72 --- /dev/null +++ b/codec/attributes/SMPPAddressNumberingPlanIndicator.st @@ -0,0 +1,84 @@ +" + (C) 2014 by Holger Hans Peter Freyther + All Rights Reserved + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +" + +Object subclass: SMPPAddressNumberingPlanIndicator [ + <comment: 'I re-present 5.2.6 of SMPPv3.4'> + + SMPPAddressNumberingPlanIndicator class [ + npiUnknown [ + <category: 'attribute'> + ^2r000 + ] + + npiISDN [ + <category: 'attribute'> + ^2r001 + ] + + npiData [ + <category: 'attribute'> + ^2r011 + ] + + npiTelex [ + <category: 'attribute'> + ^2r100 + ] + + npiLandMobile [ + <category: 'attribute'> + ^2r110 + ] + + npiNational [ + <category: 'attribute'> + ^2r1000 + ] + + npiPrivate [ + <category: 'attribute'> + ^2r1001 + ] + + npiERMES [ + <category: 'attribute'> + ^2r1010 + ] + + npiInternet [ + <category: 'attribute'> + ^2r1110 + ] + + npiWap [ + <category: 'attribute'> + ^2r10010 + ] + ] + + SMPPAddressNumberingPlanIndicator class >> tlvDescription [ + ^Osmo.TLVDescription new + typeKind: Osmo.TLVDescription valueOnly; + instVarName: #addr_npi; parseClass: self; + yourself + ] + + SMPPAddressNumberingPlanIndicator class >> readFrom: aStream with: anAttr [ + ^aStream next + ] +] diff --git a/codec/attributes/SMPPAddressRange.st b/codec/attributes/SMPPAddressRange.st new file mode 100644 index 0000000..22b40f1 --- /dev/null +++ b/codec/attributes/SMPPAddressRange.st @@ -0,0 +1,28 @@ +" + (C) 2014 by Holger Hans Peter Freyther + All Rights Reserved + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +" + +SMPPOctetString subclass: SMPPAddressRange [ + <comment: 'I re-present 5.2.7 of SMPPv3.4'> + + SMPPAddressRange class >> tlvDescription [ + ^super tlvDescription + instVarName: #addr_range; + minSize: 0 maxSize: 41; + yourself + ] +] diff --git a/codec/attributes/SMPPAddressTypeOfNumber.st b/codec/attributes/SMPPAddressTypeOfNumber.st new file mode 100644 index 0000000..854fae2 --- /dev/null +++ b/codec/attributes/SMPPAddressTypeOfNumber.st @@ -0,0 +1,70 @@ +" + (C) 2014 by Holger Hans Peter Freyther + All Rights Reserved + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +" + +Object subclass: SMPPAddressTypeOfNumber [ + <comment: 'I re-present 5.2.5 of SMPPv3.4'> + + SMPPAddressTypeOfNumber class [ + + tonUnknown [ + <category: 'attribute'> + ^2r000 + ] + + tonInternational [ + <category: 'attribute'> + ^2r001 + ] + + tonNational [ + <category: 'attribute'> + ^2r010 + ] + + tonNetworkSpecific [ + <category: 'attribute'> + ^2r011 + ] + + tonSubscriberNumber [ + <category: 'attribute'> + ^2r100 + ] + + tonAlphanumeric [ + <category: 'attribute'> + ^2r101 + ] + + tonAbbreviated [ + <category: 'attribute'> + ^2r110 + ] + ] + + SMPPAddressTypeOfNumber class >> tlvDescription [ + ^Osmo.TLVDescription new + instVarName: #addr_ton; parseClass: self; + typeKind: Osmo.TLVDescription valueOnly; + yourself + ] + + SMPPAddressTypeOfNumber class >> readFrom: aStream with: anAttribute [ + ^aStream next + ] +] diff --git a/codec/attributes/SMPPInterfaceVersion.st b/codec/attributes/SMPPInterfaceVersion.st new file mode 100644 index 0000000..8725add --- /dev/null +++ b/codec/attributes/SMPPInterfaceVersion.st @@ -0,0 +1,39 @@ +" + (C) 2014 by Holger Hans Peter Freyther + All Rights Reserved + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +" + +Object subclass: SMPPInterfaceVersion [ + <comment: 'I re-present 5.2.4 of SMPPv3.4'> + + SMPPInterfaceVersion class >> attrVersion34 [ + <category: 'Interface version'> + ^16r34 + ] + + + SMPPInterfaceVersion class >> tlvDescription [ + ^Osmo.TLVDescription new + instVarName: #version; parseClass: self; + typeKind: Osmo.TLVDescription valueOnly; + valueSize: 1; + yourself + ] + + SMPPInterfaceVersion class >> readFrom: aStream with: anAttribute [ + ^aStream next + ] +] diff --git a/codec/attributes/SMPPOctetString.st b/codec/attributes/SMPPOctetString.st new file mode 100644 index 0000000..cd76502 --- /dev/null +++ b/codec/attributes/SMPPOctetString.st @@ -0,0 +1,41 @@ +" + (C) 2014 by Holger Hans Peter Freyther + All Rights Reserved + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +" + +Object subclass: SMPPOctetString [ + <comment: 'I represent a variable string as used in SMPP'> + + SMPPOctetString class >> tlvDescription [ + ^Osmo.TLVDescription new + instVarName: #string; parseClass: self; + typeKind: Osmo.TLVDescription valueOnly; + yourself + ] + + SMPPOctetString class >> readFrom: aStream with: anAttribute [ + | str | + str := WriteStream on: String new. + [aStream peek = 0] whileFalse: [ + str nextPut: aStream next asCharacter]. + + "Skip the $0 now" + aStream next. + + "anAttribute... verify the max size" + ^str contents + ] +] diff --git a/codec/attributes/SMPPPassword.st b/codec/attributes/SMPPPassword.st new file mode 100644 index 0000000..2c5d78c --- /dev/null +++ b/codec/attributes/SMPPPassword.st @@ -0,0 +1,28 @@ +" + (C) 2014 by Holger Hans Peter Freyther + All Rights Reserved + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +" + +SMPPOctetString subclass: SMPPPassword [ + <comment: 'I represent 5.2.2 of SMPPv3.4'> + + SMPPPassword class >> tlvDescription [ + ^super tlvDescription + instVarName: #password; + minSize: 0 maxSize: 9; + yourself + ] +] diff --git a/codec/attributes/SMPPSystemId.st b/codec/attributes/SMPPSystemId.st new file mode 100644 index 0000000..37921fb --- /dev/null +++ b/codec/attributes/SMPPSystemId.st @@ -0,0 +1,28 @@ +" + (C) 2014 by Holger Hans Peter Freyther + All Rights Reserved + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +" + +SMPPOctetString subclass: SMPPSystemdId [ + <comment: 'I re-present 5.2.1 of SMPPv3.4'> + + SMPPSystemdId class >> tlvDescription [ + ^super tlvDescription + instVarName: #systemd_id; + minSize: 0 maxSize: 16; + yourself + ] +] diff --git a/codec/attributes/SMPPSystemType.st b/codec/attributes/SMPPSystemType.st new file mode 100644 index 0000000..4447460 --- /dev/null +++ b/codec/attributes/SMPPSystemType.st @@ -0,0 +1,28 @@ +" + (C) 2014 by Holger Hans Peter Freyther + All Rights Reserved + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +" + +SMPPOctetString subclass: SMPPSystemType [ + <comment: 'I re-present 5.2.3 of SMPPv3.4'> + + SMPPSystemType class >> tlvDescription [ + ^super tlvDescription + instVarName: #system_type; + minSize: 0 maxSize: 13; + yourself + ] +] |