Revision 1:7f0fc0d1f777, committed 2011-08-01
- Comitter:
- nucho
- Date:
- Mon Aug 01 14:46:08 2011 +0000
- Parent:
- 0:3c49891bc39d
- Commit message:
Changed in this revision
diff -r 3c49891bc39d -r 7f0fc0d1f777 RTno/BasicDataType.h
--- a/RTno/BasicDataType.h Fri Jul 29 11:23:44 2011 +0000
+++ b/RTno/BasicDataType.h Mon Aug 01 14:46:08 2011 +0000
@@ -69,7 +69,8 @@
class TimedDouble : public TimedData {
// Time timestamp;
public:
- double data;
+ //double data;
+ float data;
virtual void* GetBuffer() {
return &data;
}
diff -r 3c49891bc39d -r 7f0fc0d1f777 RTno/OutPort.cpp
--- a/RTno/OutPort.cpp Fri Jul 29 11:23:44 2011 +0000
+++ b/RTno/OutPort.cpp Mon Aug 01 14:46:08 2011 +0000
@@ -10,7 +10,7 @@
#include "OutPort.h"
#include "SendPacket.h"
#include "ReceivePacket.h"
-
+#include "Serial.h"
OutPort::OutPort(char* name, TimedBoolean& Data) :
OutPortBase(name)
@@ -132,7 +132,7 @@
{
int datalen = GetLength() * SizeofData();
int namelen = strlen(GetName());
- char packet_buffer[MAX_PACKET_SIZE];
+ char packet_buffer[MAX_PACKET_SIZE];;
packet_buffer[0] = namelen;
packet_buffer[1] = datalen;
memcpy(&(packet_buffer[2]), GetName(), namelen);
diff -r 3c49891bc39d -r 7f0fc0d1f777 RTno/PortBase.h
--- a/RTno/PortBase.h Fri Jul 29 11:23:44 2011 +0000
+++ b/RTno/PortBase.h Mon Aug 01 14:46:08 2011 +0000
@@ -28,12 +28,20 @@
int isSequenceType() {
switch(m_TypeCode) {
+ /*
case 'b':
case 'B':
case 'o':
case 'O':
case 'c':
case 'C':
+ */
+ case 'b':
+ case 'o':
+ case 'c':
+ case 'l':
+ case 'f':
+ case 'd':
return 0;
default:
return 1;
@@ -42,7 +50,7 @@
int GetLength() {
if(!isSequenceType()) {
- return 1;
+ return 1;
} else {
return ((TimedDataSeq*)m_pData)->GetBuffer()->length();
}
diff -r 3c49891bc39d -r 7f0fc0d1f777 RTno/ReceivePacket.cpp
--- a/RTno/ReceivePacket.cpp Fri Jul 29 11:23:44 2011 +0000
+++ b/RTno/ReceivePacket.cpp Mon Aug 01 14:46:08 2011 +0000
@@ -15,7 +15,7 @@
//#include <WConstants.h>
int ReceivePacket(char* packet) {
- int counter = 0;
+ //int counter = 0;
unsigned char sum = 0;
/*
while (Serial.available() < PACKET_HEADER_SIZE) {
diff -r 3c49891bc39d -r 7f0fc0d1f777 RTno/SequenceDataType.cpp
--- a/RTno/SequenceDataType.cpp Fri Jul 29 11:23:44 2011 +0000
+++ b/RTno/SequenceDataType.cpp Mon Aug 01 14:46:08 2011 +0000
@@ -7,9 +7,7 @@
#include <stdlib.h>
#include "SequenceDataType.h"
-#include "mbed.h"
-Serial pc3(p9,p10);
SequenceDataType::SequenceDataType(void** ptrptr)
{
@@ -25,9 +23,7 @@
void SequenceDataType::length(int size)
{
len = size;
- pc3.printf("len222\n\r");
free(*m_ptrptr);
- pc3.printf("len333\n\r");
*m_ptrptr = (void*)malloc(size * SizeofData());
//*m_ptrptr = (void*)malloc(size * 4);
}
diff -r 3c49891bc39d -r 7f0fc0d1f777 main.cpp
--- a/main.cpp Fri Jul 29 11:23:44 2011 +0000
+++ b/main.cpp Mon Aug 01 14:46:08 2011 +0000
@@ -73,6 +73,7 @@
OutPort encorderOut("encorder", encorder);
+
//////////////////////////////////////////
// on_initialize
//