Object <- Server <- PDUServer <- DataLinkServer |
|
|
Abort CheckDataLink Init StartDataLink StopDataLink |
|
Driver LocalIPAddress UseCount |
| Field | Type | |
|---|---|---|
| Server: | enabled: | Boolean |
| PDUServer: | numberReaders: | Unsigned |
| maxNumberReaders: | Unsigned | |
| readSemaphore: | Semaphore | |
| writeSemaphore: | Semaphore | |
| actorList: | ObjectList | |
| performanceMonitor: | Object | |
| PDUServiceInterface: | enabled: | Boolean |
| DataLinkServer: | driver: | Object |
| localIPAddress: | Unsigned | |
| useCount: | Unsigned |
Define Class DataLinkServer; inherits from PDUServer; inherits from PDUServiceInterface; abstract; field driver: Object, weak, getter, setter; // underlying driver (serial/packet/etc. server) field localIPAddress: Unsigned, getter, setter; // our IP address field useCount: Unsigned, getter, setter; // current use count (NYI) // client-visible attributes attribute Driver: Object; attribute LocalIPAddress: Unsigned; attribute UseCount: Unsigned; // connection control operations operation StartDataLink(wantsStatus: Object), noMethod; // start up the data link; if 'wantsStatus' is not nil, it represents // an object that wants to receive updates on the status of the // connection. Usually this is a StatusAnnouncement object. operation StopDataLink(), noMethod; operation CheckDataLink(): Boolean; // returns Connected(Driver(self)) by default; subclasses have // the option of doing "real" work if their protocol supports // it (e.g. PPP can use LCP echo, but SLIP has no such // support). overrides Init; overrides Abort; end class;