This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
2010-11-14 21:43:29 +00:00
|
|
|
PackageLoader fileInPackage: 'OsmoNetwork'.
|
|
|
|
|
2010-11-20 08:35:12 +00:00
|
|
|
Object subclass: SCCPConnection [
|
|
|
|
| src dst |
|
|
|
|
|
|
|
|
srcRef [
|
|
|
|
^ src
|
|
|
|
]
|
|
|
|
srcRef: aRef [
|
|
|
|
src := aRef
|
|
|
|
]
|
|
|
|
|
|
|
|
dstRef: aRef [
|
|
|
|
dst := aRef
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
2010-11-14 21:43:29 +00:00
|
|
|
Object subclass: SCCPHadler [
|
2010-11-20 08:35:12 +00:00
|
|
|
| connections last_ref |
|
2010-11-14 21:43:29 +00:00
|
|
|
<comment: 'I handle SCCP messages'>
|
|
|
|
|
|
|
|
registerOn: aDispatcher [
|
|
|
|
aDispatcher addHandler: Osmo.IPAConstants protocolSCCP
|
2010-11-15 15:26:00 +00:00
|
|
|
on: self with: #handleMsg:.
|
2010-11-14 21:43:29 +00:00
|
|
|
]
|
|
|
|
|
2010-11-15 15:26:00 +00:00
|
|
|
handleMsg: aMsg [
|
2010-11-14 21:43:29 +00:00
|
|
|
'Got a new SCCP message' printNl.
|
|
|
|
]
|
2010-11-20 08:35:12 +00:00
|
|
|
|
|
|
|
createConnection: aData [
|
|
|
|
| con res|
|
|
|
|
|
|
|
|
con := SCCPConnection new.
|
|
|
|
con srcRef: self assignSrcRef.
|
|
|
|
res := Osmo.SCCPConnectionRequest
|
|
|
|
initWith: (con srcRef) dest: (Osmo.SCCPAddress createWith: 254) data: aData.
|
|
|
|
self connections add: res.
|
|
|
|
|
|
|
|
^ res
|
|
|
|
]
|
|
|
|
|
|
|
|
assignSrcRef [
|
|
|
|
^ 666
|
|
|
|
]
|
|
|
|
|
|
|
|
connections [
|
|
|
|
^ connections ifNil: [ connections := OrderedCollection new. ]
|
|
|
|
]
|
2010-11-14 21:43:29 +00:00
|
|
|
]
|
|
|
|
|