![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
asdf
Dependencies: Servo mbed mbedConnectorInterface mbedEndpointNetwork
Fork of TempAndDistTest by
resource/ServoResource.h@4:20feba0e781b, 2015-05-09 (annotated)
- Committer:
- mnorris
- Date:
- Sat May 09 19:00:40 2015 +0000
- Revision:
- 4:20feba0e781b
- Parent:
- 3:c17adf68862b
Bug fixes, uses PUT
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mnorris | 3:c17adf68862b | 1 | #ifndef SERVO_RESOURCE_H |
mnorris | 3:c17adf68862b | 2 | #define SERVO_RESOURCE_H |
mnorris | 3:c17adf68862b | 3 | |
mnorris | 3:c17adf68862b | 4 | #include "DynamicResource.h" |
mnorris | 3:c17adf68862b | 5 | #include "Servo.h" |
mnorris | 3:c17adf68862b | 6 | |
mnorris | 3:c17adf68862b | 7 | class ServoResource : public DynamicResource { |
mnorris | 3:c17adf68862b | 8 | public: |
mnorris | 3:c17adf68862b | 9 | ServoResource(const Logger *logger, const char *name, Servo *servo, const bool observable = false) |
mnorris | 4:20feba0e781b | 10 | : DynamicResource(logger, name, "ServoResource", SN_GRS_PUT_ALLOWED, observable), servo(servo) |
mnorris | 3:c17adf68862b | 11 | {} |
mnorris | 3:c17adf68862b | 12 | |
mnorris | 3:c17adf68862b | 13 | void on(); |
mnorris | 3:c17adf68862b | 14 | void off(); |
mnorris | 3:c17adf68862b | 15 | |
mnorris | 4:20feba0e781b | 16 | virtual void put(const string); |
mnorris | 3:c17adf68862b | 17 | virtual string get(); |
mnorris | 3:c17adf68862b | 18 | |
mnorris | 3:c17adf68862b | 19 | private: |
mnorris | 3:c17adf68862b | 20 | Servo *servo; |
mnorris | 3:c17adf68862b | 21 | }; |
mnorris | 3:c17adf68862b | 22 | |
mnorris | 3:c17adf68862b | 23 | #endif |