floattest Class Reference

Inheritance diagram for floattest:

Inheritance graph
[legend]
Collaboration diagram for floattest:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 floattest ()
 floattest (nMessage &m)
virtual ~floattest ()
virtual bool AcceptClientSync () const
virtual void WriteSync (nMessage &m)
virtual void ReadSync (nMessage &m)
virtual void WriteCreate (nMessage &m)
virtual void ReceiveControl (nMessage &m)
void SendControl (REAL diff)
virtual nDescriptorCreatorDescriptor () const
virtual void debug_out ()
 floattest ()
 floattest (nMessage &m)
virtual ~floattest ()
virtual bool AcceptClientSync () const
virtual void WriteSync (nMessage &m)
virtual void ReadSync (nMessage &m)
virtual nDescriptorCreatorDescriptor () const

Public Attributes

REAL x
REAL y
deptestdep

Private Attributes

int listID


Detailed Description

Definition at line 37 of file l3_demo.cpp.


Constructor & Destructor Documentation

floattest::floattest (  )  [inline]

Definition at line 43 of file l3_demo.cpp.

References con.

00043                :nNetObject(),x(0),y(1.1){
00044         con << "created floattest.\n";
00045     }

floattest::floattest ( nMessage m  )  [inline]

Definition at line 48 of file l3_demo.cpp.

References con, nNetObject::owner, and y.

00048                           :nNetObject(m){
00049         m >> y;
00050         con << "created floattest by remote order from "
00051         << owner << " with fixed state " << y << ".\n";
00052         // as x is changing, it will be read by the following ReadSync()
00053     }

virtual floattest::~floattest (  )  [inline, virtual]

Definition at line 56 of file l3_demo.cpp.

References con, and nNetObject::owner.

00056                         {
00057         con << "deleting floattest owned by " << owner << ".\n";
00058     }

floattest::floattest (  )  [inline]

Definition at line 64 of file nettest.cpp.

References con, dep, floattests, listID, and NULL.

00064                :nNetObject(),listID(-1),x(-4){
00065         dep=NULL;
00066         con << "created floattest.\n";
00067         floattests.Add(this,listID);
00068     }

floattest::floattest ( nMessage m  )  [inline]

Definition at line 69 of file nettest.cpp.

References dep, floattests, listID, and NULL.

00069                           :nNetObject(m),listID(-1){
00070         dep=NULL;
00071         //con << "created floattest.\n";
00072         floattests.Add(this,listID);
00073     }

virtual floattest::~floattest (  )  [inline, virtual]

Definition at line 75 of file nettest.cpp.

References con, dep, floattests, listID, and tERR_ERROR.

00075                         {
00076         if(dep){
00077             tERR_ERROR("floattest deleted before deptest!");
00078         }
00079 
00080         floattests.Remove(this,listID);
00081         con << "deleted floattest.\n";
00082     }


Member Function Documentation

virtual bool floattest::AcceptClientSync (  )  const [inline, virtual]

Reimplemented from nNetObject.

Definition at line 61 of file l3_demo.cpp.

00061                                          {
00062         return true;
00063     }

virtual void floattest::WriteSync ( nMessage m  )  [inline, virtual]

Reimplemented from nNetObject.

Definition at line 66 of file l3_demo.cpp.

References nNetObject::WriteSync(), and x.

00066                                        {
00067         nNetObject::WriteSync(m);
00068         m << x;
00069     }

Here is the call graph for this function:

virtual void floattest::ReadSync ( nMessage m  )  [inline, virtual]

Reimplemented from nNetObject.

Definition at line 71 of file l3_demo.cpp.

References con, nNetObject::owner, nNetObject::ReadSync(), and x.

00071                                       {
00072         nNetObject::ReadSync(m);
00073 
00074         m >> x;
00075 
00076         // print our state
00077         con << "NAO owned by " << owner << " is in state " << x << "\n";
00078     }

Here is the call graph for this function:

virtual void floattest::WriteCreate ( nMessage m  )  [inline, virtual]

Reimplemented from nNetObject.

Definition at line 81 of file l3_demo.cpp.

References nNetObject::WriteCreate(), and y.

00081                                          {
00082         nNetObject::WriteCreate(m);
00083         m << y;
00084     }

Here is the call graph for this function:

virtual void floattest::ReceiveControl ( nMessage m  )  [inline, virtual]

Definition at line 88 of file l3_demo.cpp.

References con, nNetObject::owner, nNetObject::ReadSync(), REAL, nNetObject::RequestSync(), and x.

00088                                             {
00089         nNetObject::ReadSync(m);
00090 
00091         REAL diff;
00092         m >> diff;
00093         x+=diff;
00094 
00095         // print our state
00096         con << "NAO owned by " << owner << " got order to change by "
00097         << diff<< "; state now is " << x << ".\n";
00098 
00099         RequestSync();
00100     }

Here is the call graph for this function:

void floattest::SendControl ( REAL  diff  )  [inline]

Definition at line 103 of file l3_demo.cpp.

References nMessage::BroadCast(), and nNetObject::NewControlMessage().

00103                                {
00104         // create the message
00105         nMessage *m=NewControlMessage();
00106 
00107         // write order
00108         (*m) << diff;
00109 
00110         // send message
00111         m->BroadCast();
00112     }

Here is the call graph for this function:

nDescriptor & floattest::CreatorDescriptor ( void   )  const [virtual]

Implements nNetObject.

Definition at line 120 of file l3_demo.cpp.

References floattest_init.

00120                                                {
00121     return floattest_init;
00122 }

virtual void floattest::debug_out (  )  [inline, virtual]

Definition at line 60 of file nettest.cpp.

References con, nNetObject::owner, and x.

00060                             {
00061         con << id << ":" << owner << ":" << x;
00062     }

virtual bool floattest::AcceptClientSync (  )  const [inline, virtual]

Reimplemented from nNetObject.

Definition at line 84 of file nettest.cpp.

00084                                          {
00085         return true;
00086     }

virtual void floattest::WriteSync ( nMessage m  )  [inline, virtual]

Reimplemented from nNetObject.

Definition at line 88 of file nettest.cpp.

References nNetObject::WriteSync(), and x.

00088                                        {
00089         nNetObject::WriteSync(m);
00090         m << x;
00091     }

Here is the call graph for this function:

virtual void floattest::ReadSync ( nMessage m  )  [inline, virtual]

Reimplemented from nNetObject.

Definition at line 93 of file nettest.cpp.

References nNetObject::ReadSync(), and x.

00093                                       {
00094         nNetObject::ReadSync(m);
00095         m >> x;
00096     }

Here is the call graph for this function:

virtual nDescriptor& floattest::CreatorDescriptor (  )  const [virtual]

Implements nNetObject.


Member Data Documentation

REAL floattest::x

Definition at line 39 of file l3_demo.cpp.

Referenced by debug_out(), ntest(), ReadSync(), ReceiveControl(), and WriteSync().

REAL floattest::y

Definition at line 40 of file l3_demo.cpp.

Referenced by floattest(), and WriteCreate().

int floattest::listID [private]

Definition at line 54 of file nettest.cpp.

Referenced by deptest::deptest(), floattest(), deptest::~deptest(), and ~floattest().

deptest* floattest::dep

Definition at line 58 of file nettest.cpp.

Referenced by deptest::ClearToTransmit(), deptest::debug_out(), deptest::deptest(), floattest(), deptest::WriteCreate(), deptest::~deptest(), and ~floattest().


The documentation for this class was generated from the following files:
Generated on Sat Mar 15 23:32:39 2008 for Armagetron Advanced by  doxygen 1.5.4