Publish for the JRO Radar Controller.

Dependents:   JRO_CR2 frdm_test

Fork of jro by Miguel Urco

Revision:
4:de495ce256b8
Parent:
2:3d8d52e9751c
Child:
5:6500be930b36
--- a/JroIpdata.cpp	Thu Feb 05 21:31:37 2015 +0000
+++ b/JroIpdata.cpp	Tue Feb 10 14:28:42 2015 +0000
@@ -89,7 +89,7 @@
     return 1;
     }
     
-char* IpData::encode(unsigned short cmd, char* payload, unsigned long len_payload){
+char* IpData::encode(unsigned short cmd, const char* payload, unsigned long len_payload){
 
     int head_size= strlen(HEADER);
     char xor_wr;
@@ -220,13 +220,28 @@
         return NULL;
         
     return this->payload;
-    }
+}
  
 char* IpData::getTxData(){
         
     return this->tx_buff;
-    }   
+}
+
 unsigned long IpData::getTxDataLen(){
         
     return this->len_tx_buffer;
-    }
\ No newline at end of file
+}
+
+char* IpData::getNIData(unsigned short cmd){
+    
+    char tx_data[5];
+    
+    strcpy(tx_data, NI_PAYLOAD);
+    
+    return this->encode(cmd, tx_data, NI_LEN);
+}
+
+unsigned long IpData::getNIDataLen(){
+        
+    return this->len_tx_buffer;
+}
\ No newline at end of file