Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: TextLCD MbedJSONValue libMotiv picojson mbed-rtos mbed
Fork of Mbed_MotiVControllerBox by
library/Device.cpp
- Committer:
- TimWoo
- Date:
- 2014-11-15
- Revision:
- 1:d54aed10ddf3
- Parent:
- devices/Device.cpp@ 0:2279181caaa1
File content as of revision 1:d54aed10ddf3:
#include "Device.h"
#include <stdlib.h>
using namespace std;
Device::Device()
:id(0) {}
Device::Device(int id)
:id(id) {}
Device::~Device()
{
}
Device::Device(const Device& d)
{
id = d.id;
}
Device& Device::operator=(const Device& d)
{
id = d.id;
return *this;
}
int Device::getId() const
{
return id;
}
Device::mCommand Device::makeCommand(int cmd, int value)
{
mCommand rc;
rc.id = id;
rc.cmd = cmd;
rc.val = value;
rc.delim = DELIMITER;
return rc;
}
