-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
31 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,36 @@ | ||
import { Endpoint } from "../types/addressing.ts"; | ||
|
||
/** | ||
* Base class for all DATEX communication interfaces | ||
*/ | ||
export abstract class CommunicationInterface { | ||
//TODO: | ||
|
||
abstract name: string | ||
abstract description?: string | ||
|
||
/** | ||
* Can send data | ||
*/ | ||
abstract canSend: boolean | ||
|
||
/** | ||
* Can receive data | ||
*/ | ||
abstract canReceive: boolean | ||
|
||
/** | ||
* Has a connection to the supranet, use as a default interface if possible | ||
*/ | ||
abstract isGlobal: boolean // | ||
|
||
|
||
/** | ||
* Send a DATEX block via this interface | ||
* @param datex | ||
* @param to | ||
*/ | ||
public send(datex:ArrayBuffer, to?: Endpoint) { | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters