robot arm demo team / Mbed 2 deprecated RobotArmDemo Featured

Dependencies:   AX-12A Dynamixel mbed iothub_client EthernetInterface NTPClient ConfigFile SDFileSystem iothub_amqp_transport mbed-rtos proton-c-mbed wolfSSL

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers MeasureBuf.h Source File

MeasureBuf.h

00001 // Copyright (c) Microsoft. All rights reserved.
00002 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
00003 
00004 #ifndef __MEASUREBUF_H__
00005 #define __MEASUREBUF_H__
00006 
00007 #include "mbed.h"
00008 #include "SafeCircBuf.h"
00009 #include "RobotArmCfg.h"
00010 
00011 
00012 #define MeasureBufSize  8
00013 
00014 
00015 class MeasureGroup
00016 {
00017 public:
00018     MeasureGroup() {};
00019     
00020     MeasureGroup& operator=(const MeasureGroup& rhs);
00021     
00022     void SetMeasure(int numParts, float vals[]);
00023     
00024     int NumVals;
00025     
00026     float MeasVals[NUMJOINTS];
00027 };
00028 
00029 class MeasureSnapshot
00030 {
00031 public:
00032     MeasureSnapshot() {};
00033     
00034     MeasureGroup Temps;
00035     
00036     MeasureGroup Volts;
00037     
00038     MeasureGroup Loads;
00039     
00040     MeasureGroup Positions;
00041     
00042     time_t Created;
00043     
00044     int CreatedMs;
00045 };
00046 
00047 extern SafeCircBuf<MeasureSnapshot, MeasureBufSize, uint32_t> MeasureBuf;
00048 
00049 #endif