reverted HTTPCLient debug back to defaulted off
Fork of MTS-Socket by
CommInterface.h@1:096f484f3ae6, 2014-05-19 (annotated)
- Committer:
- Mike Fiore
- Date:
- Mon May 19 12:36:11 2014 -0500
- Revision:
- 1:096f484f3ae6
- Parent:
- 0:eef30dbe1130
- Child:
- 2:ebc6129de4e8
add socket code
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mfiore | 0:eef30dbe1130 | 1 | #ifndef COMMINTERFACE_H |
mfiore | 0:eef30dbe1130 | 2 | #define COMMINTERFACE_H |
mfiore | 0:eef30dbe1130 | 3 | |
Mike Fiore |
1:096f484f3ae6 | 4 | #include "mbed.h" |
Mike Fiore |
1:096f484f3ae6 | 5 | |
Mike Fiore |
1:096f484f3ae6 | 6 | /** This pure virtual class for communications link of interface. This class |
Mike Fiore |
1:096f484f3ae6 | 7 | * should be derived from when creating a class to manage the underlying connection |
Mike Fiore |
1:096f484f3ae6 | 8 | * of a new link type. |
Mike Fiore |
1:096f484f3ae6 | 9 | */ |
Mike Fiore |
1:096f484f3ae6 | 10 | class CommInterface |
Mike Fiore |
1:096f484f3ae6 | 11 | { |
Mike Fiore |
1:096f484f3ae6 | 12 | public: |
Mike Fiore |
1:096f484f3ae6 | 13 | /** This method is used to establish a connection on a communications link. Required |
Mike Fiore |
1:096f484f3ae6 | 14 | * configurations and settings should be done in other calls or an init function. |
Mike Fiore |
1:096f484f3ae6 | 15 | * |
Mike Fiore |
1:096f484f3ae6 | 16 | * @returns true if the connection was successfully established, otherwise false. |
Mike Fiore |
1:096f484f3ae6 | 17 | */ |
Mike Fiore |
1:096f484f3ae6 | 18 | virtual bool connect() = 0; |
Mike Fiore |
1:096f484f3ae6 | 19 | |
Mike Fiore |
1:096f484f3ae6 | 20 | /** This method is used to disconnect a communications like. This includes |
Mike Fiore |
1:096f484f3ae6 | 21 | * any cleanup required before another connection can be made. |
Mike Fiore |
1:096f484f3ae6 | 22 | */ |
Mike Fiore |
1:096f484f3ae6 | 23 | virtual void disconnect() = 0; |
Mike Fiore |
1:096f484f3ae6 | 24 | |
Mike Fiore |
1:096f484f3ae6 | 25 | /** This method is used to check if the link is currently connected. |
Mike Fiore |
1:096f484f3ae6 | 26 | * |
Mike Fiore |
1:096f484f3ae6 | 27 | * @returns true if currently connected, otherwise false. |
Mike Fiore |
1:096f484f3ae6 | 28 | */ |
Mike Fiore |
1:096f484f3ae6 | 29 | virtual bool isConnected() = 0; |
Mike Fiore |
1:096f484f3ae6 | 30 | |
Mike Fiore |
1:096f484f3ae6 | 31 | /** This method is used to reset the device that provides the communications |
Mike Fiore |
1:096f484f3ae6 | 32 | * capability. Note that this call should block until the commincations device |
Mike Fiore |
1:096f484f3ae6 | 33 | * is ready for use. |
Mike Fiore |
1:096f484f3ae6 | 34 | */ |
Mike Fiore |
1:096f484f3ae6 | 35 | virtual void reset() = 0; |
Mike Fiore |
1:096f484f3ae6 | 36 | }; |
Mike Fiore |
1:096f484f3ae6 | 37 | |
Mike Fiore |
1:096f484f3ae6 | 38 | #endif /* COMMINTERFACE_H */ |