07-07-2006 08:48 AM - edited 07-07-2006 08:48 AM
public struct PacketTesting the returned parameters:
{
public string state;
public double pressure;
public double temperature;
// more vars to be added....
}
#####################################################This seems like it might have been covered already, if so, please point me to the post. Perhaps I am not searching for the right topic.
using System;
namespace test.examples
{
public struct Packet
{
public string state;
public double pressure;
public double temperature;
// more vars to be added....
}
public class PacketTest
{
public PacketTest()
{}
public Packet runTest()
{
// simulate a packet returned from a real test.
Packet myPacket = new Packet();
// populate the packet structure
myPacket.state = "Storage";
myPacket.pressure = 321.1;
myPacket.temperature = 25.6;
// return the packet
return myPacket;
}
}
}
###################################################
Message Edited by bryanthomas on 07-07-2006 08:49 AM
07-07-2006 10:36 AM
07-07-2006 12:57 PM
07-10-2006 11:04 AM
07-10-2006 11:31 AM