Embed: (wiki syntax)

« Back to documentation index

VBus Class Reference

VBus Class Reference

VBus module. More...

#include <VBus.h>

Public Member Functions

 VBus (PinName tx, PinName rx)
 VBus constructor.
bool Read ()
 The VBus destructor.
void SaveToSDcard (char *datetime, char *date, char *dayfn)
 SaveToSDcard Saves the device parameters to a textfile /sd/vb20110101.txt.
void ClearMax ()
 ClearMax Clears the maximum values.

Detailed Description

VBus module.

Example:

 #include "mbed.h"
 #include "VBus.h"

 Serial pc(USBTX, USBRX);
 VBus ResolBS(NC, p10);

 int main() {

     while(1){
         if (ResolBS.Read()) {

             pc.printf("T collector = %.1f\r\n",ResolBS.Sensor1_temp);
             pc.printf("T store     = %.1f\r\n",ResolBS.Sensor2_temp);
             pc.printf("T3          = %.1f\r\n",ResolBS.Sensor3_temp);
             pc.printf("T4          = %.1f\r\n",ResolBS.Sensor4_temp);
         }
     }
 }

Definition at line 67 of file VBus.h.


Constructor & Destructor Documentation

VBus ( PinName  tx,
PinName  rx 
)

VBus constructor.

The VBus constructor is used to initialise the VBus object.

Parameters:
txThe TX pin is NOT connected
rxThe RX pin is connected to p10 or p14 or p27.

Definition at line 41 of file VBus.cpp.


Member Function Documentation

void ClearMax (  )

ClearMax Clears the maximum values.

Definition at line 343 of file VBus.cpp.

bool Read (  )

The VBus destructor.

Read Reads all the device parameters (Sensors, Pumpspeed, RelaisMask)

******************* End of frames ****************

Definition at line 74 of file VBus.cpp.

void SaveToSDcard ( char *  datetime,
char *  date,
char *  dayfn 
)

SaveToSDcard Saves the device parameters to a textfile /sd/vb20110101.txt.

Definition at line 306 of file VBus.cpp.