blob: 0789a68692f653784b13b266033efd767a7cb5dd [file] [log] [blame]
brians343bc112013-02-10 01:53:46 +00001#ifndef __CRIO_MOTOR_SERVER_OUTPUT_DEVICE_H_
2#define __CRIO_MOTOR_SERVER_OUTPUT_DEVICE_H_
3
4#include <stdint.h>
5#include "aos/crio/shared_libs/ByteBuffer.h"
6
7namespace aos {
8
9class OutputDevice {
10 protected:
11 OutputDevice() {
12 }
13 public:
14 // Reads the value out of buff and stores it somewhere for SetValue to use.
15 // Returns whether or not it successfully read a whole value out of buff.
16 virtual bool ReadValue(ByteBuffer &buff) = 0;
17 // Actually sets the output device to the value saved by ReadValue.
18 virtual void SetValue() = 0;
19 // Gets called when no values come in for a while.
20 virtual void NoValue() = 0;
21};
22
23} // namespace aos
24
25#endif
26