Sofaswitch-svn
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- 390 discussions
Author: derek
Date: Wed Nov 8 23:03:57 2006
New Revision: 162
Modified:
sofaswitch/trunk/mcu/participant.h
Log:
Fix a poorly constructed doxygen comment.
Modified: sofaswitch/trunk/mcu/participant.h
==============================================================================
--- sofaswitch/trunk/mcu/participant.h (original)
+++ sofaswitch/trunk/mcu/participant.h Wed Nov 8 23:03:57 2006
@@ -257,10 +257,15 @@
srcMemberId(this).
Remember, this participant instance is from srcMemberId(this) to
- dstMemberId;
+ dstMemberId. For every current instance of a Participant class, there
+ is on pointing in the reverse direction. So, you have a Participant
+ from srcMemberId to dstMemberId, and another from dstMemberId to
+ srcMemberId.
- This is a one line method, that was not easy to move into this method.
- -that would have meanth including member.h into this file, and having a
+ This is a one line method, that was not easy to move into this class
+ definition file
+
+ -that would have meant including member.h into this file, and having a
weird double reverse include process. Further, we can now nicely put
comment generating code into the body of this method.
*/
1
0
Author: derek
Date: Wed Nov 8 22:51:30 2006
New Revision: 161
Modified:
sofaswitch/trunk/callflow/src/canvas.cpp
sofaswitch/trunk/callflow/src/loadnewgraph.cpp
sofaswitch/trunk/callflow/src/shapelist.cpp
sofaswitch/trunk/callflow/tests/amplaywavfile.src
sofaswitch/trunk/callflow/tests/dtmf_from_sound.src
sofaswitch/trunk/callflow/tests/forloop.src
sofaswitch/trunk/callflow/tests/loadgraph.src
sofaswitch/trunk/callflow/tests/makevoipcall.src
sofaswitch/trunk/callflow/tests/requestnode.src
sofaswitch/trunk/callflow/tests/simpleeventer.src
sofaswitch/trunk/callflow/tests/timetest.src
Log:
Make sure all the tests work.
Loadgraph works correctly - the spawned thread now closes down at the right time.
Modified: sofaswitch/trunk/callflow/src/canvas.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/canvas.cpp (original)
+++ sofaswitch/trunk/callflow/src/canvas.cpp Wed Nov 8 22:51:30 2006
@@ -18,7 +18,7 @@
#error Clipboard must be enabled for copy and paste to work.
#endif
-#include <wx/textfile.h>
+#include <wx/textfile.h>
#include <wx/tokenzr.h>
#include <wx/tipwin.h>
#include <wx/timer.h>
@@ -27,536 +27,610 @@
#include "canvas.h"
#include "callflow.h"
-BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
-
- EVT_LEFT_DOWN (MyCanvas::OnLeftDown)
- EVT_LEFT_UP (MyCanvas::OnLeftUp)
- EVT_RIGHT_DOWN (MyCanvas::OnRightDown)
- EVT_MOTION (MyCanvas::OnMouseMove)
- EVT_PAINT (MyCanvas::OnPaint)
- EVT_ENTER_WINDOW(MyCanvas::OnMouseEnter)
- EVT_LEAVE_WINDOW(MyCanvas::OnMouseLeave)
- EVT_CHAR (MyCanvas::OnChar)
- EVT_TIMER (TimerId, MyCanvas::OnProgressTimer)
-
-END_EVENT_TABLE()
-
-MyCanvas::MyCanvas(MyFrame* parent):
- wxScrolledWindow((wxWindow*)parent, -1)
+BEGIN_EVENT_TABLE (MyCanvas, wxScrolledWindow) EVT_LEFT_DOWN (MyCanvas::OnLeftDown) EVT_LEFT_UP (MyCanvas::OnLeftUp) EVT_RIGHT_DOWN (MyCanvas::OnRightDown) EVT_MOTION (MyCanvas::OnMouseMove) EVT_PAINT (MyCanvas::OnPaint) EVT_ENTER_WINDOW (MyCanvas::OnMouseEnter) EVT_LEAVE_WINDOW (MyCanvas::OnMouseLeave) EVT_CHAR (MyCanvas::OnChar) EVT_TIMER (TimerId, MyCanvas::OnProgressTimer) END_EVENT_TABLE ()MyCanvas::MyCanvas (MyFrame * parent):
+wxScrolledWindow ((wxWindow *) parent, -1)
{
- pFrame = parent ;
- SetVirtualSize (1000, 1000); // width, height
- SetScrollRate(20,20); // scroll x and y
- SetBackgroundColour (wxColour (255, 255, 240));
- editingMode = WaitDownEvent;
+ pFrame = parent;
+ SetVirtualSize (1000, 1000); // width, height
+ SetScrollRate (20, 20); // scroll x and y
+ SetBackgroundColour (wxColour (255, 255, 240));
+ editingMode = WaitDownEvent;
- timerActivity = new wxTimer(this, TimerId);
- timerActivity->Start(500);
+ timerActivity = new wxTimer (this, TimerId);
+ timerActivity->Start (500);
}
MyCanvas::~MyCanvas ()
{
- delete timerActivity;
+ delete timerActivity;
}
// Called when window needs to be repainted.
-void MyCanvas::OnPaint(wxPaintEvent& event)
-{
- activeShapes.ClearConnectionPoints();
- activeShapes.MarkConnectionPoints();
-
- wxPaintDC dc(this);
- PrepareDC(dc);
-
- // Find Out where the window is scrolled to
- int vbX,vbY; // Top left corner of client
- GetViewStart(&vbX,&vbY);
- wxRegionIterator upd(GetUpdateRegion()); // get the update rect list
-
- wxRect nrect;
- while (upd) {
- wxRect rect(upd.GetRect());
- wxPoint tl(rect.x, rect.y);
- wxPoint ntl;
- CalcUnscrolledPosition(tl.x, tl.y, &ntl.x, &ntl.y);
- wxSize updateSize(upd.GetWidth(), upd.GetHeight());
- nrect= wxRect(ntl, updateSize);
-
- MyListShapes::iterator it = activeShapes.begin();
- while (it != activeShapes.end()) {
- DndShape *oneShape = it->second;
- if (oneShape != NULL) {
- if (oneShape->Intersects(nrect))
- oneShape->Draw(dc);
- }
- it++;
- }
- upd ++ ;
- }
-
- if (selectingRegion.IsSelected()) {
- selectingRegion.Draw(dc);
- }
-
- if (GetEditingMode() == PlaceJoinBlocks) {
- wxPoint last;
- if (joinBlocks.GetLastPoint(last)) {
- dc.DrawLine(last, lastMousePoint);
- joinBlocks.Draw(dc);
+void
+MyCanvas::OnPaint (wxPaintEvent & event)
+{
+ activeShapes.ClearConnectionPoints ();
+ activeShapes.MarkConnectionPoints ();
+
+ wxPaintDC dc (this);
+ PrepareDC (dc);
+
+ // Find Out where the window is scrolled to
+ int vbX, vbY; // Top left corner of client
+ GetViewStart (&vbX, &vbY);
+ wxRegionIterator upd (GetUpdateRegion ()); // get the update rect list
+
+ wxRect nrect;
+ while (upd)
+ {
+ wxRect rect (upd.GetRect ());
+ wxPoint tl (rect.x, rect.y);
+ wxPoint ntl;
+ CalcUnscrolledPosition (tl.x, tl.y, &ntl.x, &ntl.y);
+ wxSize updateSize (upd.GetWidth (), upd.GetHeight ());
+ nrect = wxRect (ntl, updateSize);
+
+ MyListShapes::iterator it = activeShapes.begin ();
+ while (it != activeShapes.end ())
+ {
+ DndShape *oneShape = it->second;
+ if (oneShape != NULL)
+ {
+ if (oneShape->Intersects (nrect))
+ oneShape->Draw (dc);
+ }
+ it++;
+ }
+ upd++;
}
- }
+
+ if (selectingRegion.IsSelected ())
+ {
+ selectingRegion.Draw (dc);
+ }
+
+ if (GetEditingMode () == PlaceJoinBlocks)
+ {
+ wxPoint last;
+ if (joinBlocks.GetLastPoint (last))
+ {
+ dc.DrawLine (last, lastMousePoint);
+ joinBlocks.Draw (dc);
+ }
+ }
}
-wxPoint MyCanvas::GetUnscrolledPosition(wxMouseEvent & event)
+wxPoint MyCanvas::GetUnscrolledPosition (wxMouseEvent & event)
{
- wxPoint pt(event.GetX(), event.GetY());
- wxPoint disp;
- CalcUnscrolledPosition(pt.x, pt.y, &disp.x, &disp.y);
+ wxPoint
+ pt (event.GetX (), event.GetY ());
+ wxPoint
+ disp;
+ CalcUnscrolledPosition (pt.x, pt.y, &disp.x, &disp.y);
// printf(" %d,%d ===> %d,%d\n", pt.x, pt.y, disp.x, disp.y);
- return disp;
+ return disp;
}
-void MyCanvas::OnLeftDown (wxMouseEvent & event)
+void
+MyCanvas::OnLeftDown (wxMouseEvent & event)
{
- wxPoint pt = GetUnscrolledPosition(event);
- lastMousePoint = pt;
- lastMouseDownPoint = pt;
+ wxPoint pt = GetUnscrolledPosition (event);
+ lastMousePoint = pt;
+ lastMouseDownPoint = pt;
- if (GetEditingMode() == PlaceJoinBlocks) {
- joinBlocks.AddNewPoint(pt);
- Refresh();
- return;
- }
+ if (GetEditingMode () == PlaceJoinBlocks)
+ {
+ joinBlocks.AddNewPoint (pt);
+ Refresh ();
+ return;
+ }
- if (GetEditingMode() == PlaceOneShape) {
- DndShape::Kind kind = pFrame->GetImageTypeForPlacing();
- DndShape *newShape = DndShape::Construct(kind);
- if (newShape != NULL) {
- pFrame->SetImageTypeForPlacing(DndShape::None);
- newShape->CenterOnThisPosition(pt);
- activeShapes.Append(newShape);
- Refresh();
- SetEditingMode(WaitDownEvent);
- }
- return;
- }
+ if (GetEditingMode () == PlaceOneShape)
+ {
+ DndShape::Kind kind = pFrame->GetImageTypeForPlacing ();
+ DndShape *newShape = DndShape::Construct (kind);
+ if (newShape != NULL)
+ {
+ pFrame->SetImageTypeForPlacing (DndShape::None);
+ newShape->CenterOnThisPosition (pt);
+ activeShapes.Append (newShape);
+ Refresh ();
+ SetEditingMode (WaitDownEvent);
+ }
+ return;
+ }
- /* Left button down, no current "Kind" selected. we are therefore going to
- move an object from the cureent position, or mark additional buttons.. */
- if (!event.ShiftDown()) {
- selectingRegion.SetSelected(false);
- selectingRegion.SetPosition(lastMousePoint);
- activeShapes.UnselectAllShapes();
- }
- SetEditingMode(DownEventNew);
+ /* Left button down, no current "Kind" selected. we are therefore going to
+ * move an object from the cureent position, or mark additional buttons.. */
+ if (!event.ShiftDown ())
+ {
+ selectingRegion.SetSelected (false);
+ selectingRegion.SetPosition (lastMousePoint);
+ activeShapes.UnselectAllShapes ();
+ }
+ SetEditingMode (DownEventNew);
- MyListShapes::iterator it = activeShapes.begin();
- while (it != activeShapes.end()) {
- DndShape *oneShape = it->second;
- if (oneShape != NULL) {
- if (oneShape->Intersects(pt)) {
- oneShape->SetSelected();
- Refresh();
- return;
+ MyListShapes::iterator it = activeShapes.begin ();
+ while (it != activeShapes.end ())
+ {
+ DndShape *oneShape = it->second;
+ if (oneShape != NULL)
+ {
+ if (oneShape->Intersects (pt))
+ {
+ oneShape->SetSelected ();
+ Refresh ();
+ return;
+ }
+ }
+ it++;
}
- }
- it++;
- }
-
- if (!event.ShiftDown())
- SetEditingMode(SelectRectangle);
+
+ if (!event.ShiftDown ())
+ SetEditingMode (SelectRectangle);
}
-void MyCanvas::OnProgressTimer(wxTimerEvent & event)
+void
+MyCanvas::OnProgressTimer (wxTimerEvent & event)
{
- static int count = 0;
- count++;
- bool mouseHasStopped = (lastMouseMovePoint == oldMousePoint);
- oldMousePoint = lastMouseMovePoint;
+ static int count = 0;
+ count++;
+ bool mouseHasStopped = (lastMouseMovePoint == oldMousePoint);
+ oldMousePoint = lastMouseMovePoint;
- if (mouseHasStopped) {
- MyListShapes::iterator it = activeShapes.begin();
- // printf(" Found a no movment at %3d %3d for %d\n",
- // oldMousePoint.x, oldMousePoint.y, count++);
-
- while (it != activeShapes.end()) {
- DndShape *oneShape = it->second;
- if (oneShape != NULL) {
- if (oneShape->Intersects(oldMousePoint)) {
- wxPaintDC dc(this);
- PrepareDC(dc);
- wxCoord w, h;
- wxString toolTip = oneShape->GetToolTip();
- GetTextExtent(toolTip, &w, &h);
- wxPoint thisPoint;
- thisPoint.x = oldMousePoint.x - (w/2);
- thisPoint.y = oldMousePoint.y - h;
- dc.SetPen(*wxWHITE);
- dc.SetBrush(wxBrush(*wxWHITE, wxSOLID));
- dc.DrawRoundedRectangle(thisPoint.x, thisPoint.y, w, h, 5);
- dc.SetPen(*wxBLACK);
- dc.DrawText(toolTip, thisPoint);
- }
- }
- it++;
- }
- } else
- Refresh();
+ if (mouseHasStopped)
+ {
+ MyListShapes::iterator it = activeShapes.begin ();
+ // printf(" Found a no movment at %3d %3d for %d\n",
+ // oldMousePoint.x, oldMousePoint.y, count++);
+
+ while (it != activeShapes.end ())
+ {
+ DndShape *oneShape = it->second;
+ if (oneShape != NULL)
+ {
+ if (oneShape->Intersects (oldMousePoint))
+ {
+ wxPaintDC dc (this);
+ PrepareDC (dc);
+ wxCoord w, h;
+ wxString toolTip =
+ oneShape->GetToolTip ();
+ GetTextExtent (toolTip, &w, &h);
+ wxPoint thisPoint;
+ thisPoint.x =
+ oldMousePoint.x - (w / 2);
+ thisPoint.y = oldMousePoint.y - h;
+ dc.SetPen (*wxWHITE);
+ dc.SetBrush (wxBrush
+ (*wxWHITE, wxSOLID));
+ dc.DrawRoundedRectangle (thisPoint.x,
+ thisPoint.y,
+ w, h, 5);
+ dc.SetPen (*wxBLACK);
+ dc.DrawText (toolTip, thisPoint);
+ }
+ }
+ it++;
+ }
+ }
+ else
+ Refresh ();
}
-void MyCanvas::OnMouseMove (wxMouseEvent & event)
-{
- wxPoint currentMousePoint = GetUnscrolledPosition(event);
- lastMouseMovePoint = currentMousePoint;
+void
+MyCanvas::OnMouseMove (wxMouseEvent & event)
+{
+ wxPoint currentMousePoint = GetUnscrolledPosition (event);
+ lastMouseMovePoint = currentMousePoint;
- EditingMode em = GetEditingMode();
+ EditingMode em = GetEditingMode ();
- if (em == PlaceOneShape) {
- lastMousePoint = currentMousePoint;
- return;
- }
+ if (em == PlaceOneShape)
+ {
+ lastMousePoint = currentMousePoint;
+ return;
+ }
- if (em == DownEventNew) {
- if (selectingRegion.IsSelected()) {
- SetEditingMode(MovingShapesRectangle);
- } else {
- SetEditingMode(MovingShapes);
- }
- }
+ if (em == DownEventNew)
+ {
+ if (selectingRegion.IsSelected ())
+ {
+ SetEditingMode (MovingShapesRectangle);
+ }
+ else
+ {
+ SetEditingMode (MovingShapes);
+ }
+ }
- if (em == PlaceJoinBlocks) {
- lastMousePoint = currentMousePoint;
- Refresh();
- return;
- }
+ if (em == PlaceJoinBlocks)
+ {
+ lastMousePoint = currentMousePoint;
+ Refresh ();
+ return;
+ }
- if (event.LeftIsDown()) {
- if ((em == MovingShapes) || (em == MovingShapesRectangle)) {
- wxPoint delta;
-
- delta.x = currentMousePoint.x - lastMousePoint.x;
- delta.y = currentMousePoint.y - lastMousePoint.y;
-
- MyListShapes::iterator it = activeShapes.begin();
- while (it != activeShapes.end()) {
- DndShape *oneShape = it->second;
- if (oneShape != NULL) {
- if (oneShape->IsSelected()) {
- oneShape->AdjustPosition(delta);
- }
- }
- it++;
+ if (event.LeftIsDown ())
+ {
+ if ((em == MovingShapes) || (em == MovingShapesRectangle))
+ {
+ wxPoint delta;
+
+ delta.x = currentMousePoint.x - lastMousePoint.x;
+ delta.y = currentMousePoint.y - lastMousePoint.y;
+
+ MyListShapes::iterator it = activeShapes.begin ();
+ while (it != activeShapes.end ())
+ {
+ DndShape *oneShape = it->second;
+ if (oneShape != NULL)
+ {
+ if (oneShape->IsSelected ())
+ {
+ oneShape->
+ AdjustPosition
+ (delta);
+ }
+ }
+ it++;
+ }
+
+ if (em == MovingShapesRectangle)
+ selectingRegion.AdjustPosition (delta);
+ lastMousePoint = currentMousePoint;
+ Refresh ();
+ return;
+ }
}
-
- if (em == MovingShapesRectangle)
- selectingRegion.AdjustPosition(delta);
+
lastMousePoint = currentMousePoint;
- Refresh();
- return;
- }
- }
+ if (em == SelectRectangle)
+ {
+ //Calculate the region that we draw a box around.
+ selectingRegion.SetOtherCorner (currentMousePoint);
- lastMousePoint = currentMousePoint;
- if (em == SelectRectangle) {
- //Calculate the region that we draw a box around.
- selectingRegion.SetOtherCorner(currentMousePoint);
+ MyListShapes::iterator it = activeShapes.begin ();
+ while (it != activeShapes.end ())
+ {
+ DndShape *oneShape = it->second;
+ if (oneShape != NULL)
+ {
+ bool isSelected =
+ oneShape->Intersects (selectingRegion.
+ GetRect ());
+ oneShape->SetSelected (isSelected);
+ }
+ it++;
+ }
+ Refresh ();
+ return;
+ }
- MyListShapes::iterator it = activeShapes.begin();
- while (it != activeShapes.end()) {
- DndShape *oneShape = it->second;
- if (oneShape != NULL) {
- bool isSelected = oneShape->Intersects(selectingRegion.GetRect());
- oneShape->SetSelected(isSelected);
- }
- it++;
- }
- Refresh();
- return;
- }
-
// printf("On mouse move at %d, %d %s\n",
-// event.GetX(), event.GetY(),
-// (event.LeftIsDown() ? "is down" : "is up"));
+// event.GetX(), event.GetY(),
+// (event.LeftIsDown() ? "is down" : "is up"));
}
-
-void MyCanvas::OnLeftUp (wxMouseEvent & event)
+
+void
+MyCanvas::OnLeftUp (wxMouseEvent & event)
{
- if (GetEditingMode() != PlaceJoinBlocks)
- SetEditingMode(WaitDownEvent);
- Refresh();
- // printf("On mouse left up at %d, %d \n",
- // event.GetX(), event.GetY());
+ if (GetEditingMode () != PlaceJoinBlocks)
+ SetEditingMode (WaitDownEvent);
+ Refresh ();
+ // printf("On mouse left up at %d, %d \n",
+ // event.GetX(), event.GetY());
}
-void MyCanvas::OnMouseEnter (wxMouseEvent & event)
+void
+MyCanvas::OnMouseEnter (wxMouseEvent & event)
{
- if (GetEditingMode() == PlaceOneShape) {
- Refresh();
- return;
- }
-
- // SetEditingMode(WaitDownEvent);
- Refresh();
+ if (GetEditingMode () == PlaceOneShape)
+ {
+ Refresh ();
+ return;
+ }
+
+ // SetEditingMode(WaitDownEvent);
+ Refresh ();
}
-void MyCanvas::OnMouseLeave (wxMouseEvent & event)
+void
+MyCanvas::OnMouseLeave (wxMouseEvent & event)
{
- // SetEditingMode(WaitDownEvent);
- Refresh();
+ // SetEditingMode(WaitDownEvent);
+ Refresh ();
}
-
-void MyCanvas::OnRightDown (wxMouseEvent & event)
+
+void
+MyCanvas::OnRightDown (wxMouseEvent & event)
{
- wxPoint pt = GetUnscrolledPosition(event);
- if (editingMode == PlaceJoinBlocks) {
- joinBlocks.AddNewPoint(pt);
-
- DndShape *nJoin = DndShape::Construct(DndShape::JoinBlocks);
- wxString points = joinBlocks.GetShapeInfoSpecial();
- joinBlocks.RemoveCurrentPoints();
- nJoin->SetShapeInfoSpecial(points);
- activeShapes.Append(nJoin);
-
- SetEditingMode(WaitDownEvent);
- Refresh();
- return;
- }
+ wxPoint pt = GetUnscrolledPosition (event);
+ if (editingMode == PlaceJoinBlocks)
+ {
+ joinBlocks.AddNewPoint (pt);
- MyListShapes::iterator it = activeShapes.begin();
- while (it != activeShapes.end()) {
- DndShape *oneShape = it->second;
- if (oneShape != NULL) {
- if (oneShape->Intersects(pt))
- oneShape->ProcessRightMouseButton(pFrame);
- }
- it++;
- }
+ DndShape *nJoin = DndShape::Construct (DndShape::JoinBlocks);
+ wxString points = joinBlocks.GetShapeInfoSpecial ();
+ joinBlocks.RemoveCurrentPoints ();
+ nJoin->SetShapeInfoSpecial (points);
+ activeShapes.Append (nJoin);
+
+ SetEditingMode (WaitDownEvent);
+ Refresh ();
+ return;
+ }
+
+ MyListShapes::iterator it = activeShapes.begin ();
+ while (it != activeShapes.end ())
+ {
+ DndShape *oneShape = it->second;
+ if (oneShape != NULL)
+ {
+ if (oneShape->Intersects (pt))
+ oneShape->ProcessRightMouseButton (pFrame);
+ }
+ it++;
+ }
}
-void MyCanvas::ScreenToClipboard()
+void
+MyCanvas::ScreenToClipboard ()
{
- wxString toCopy;
-
- MyListShapes::iterator it = activeShapes.begin();
- while (it != activeShapes.end()) {
- DndShape *oneShape = it->second;
- if (oneShape != NULL) {
- if (oneShape->IsSelected())
- toCopy += oneShape->GetShapeInfo();
- }
- it++;
- }
-
- //printf("shape %s\n", (const char *)toCopy);
- wxTheClipboard->UsePrimarySelection();
- if (wxTheClipboard->Open()) {
- wxTheClipboard->SetData( new wxTextDataObject(toCopy) );
- wxTheClipboard->Close();
- }
+ wxString toCopy;
+
+ MyListShapes::iterator it = activeShapes.begin ();
+ while (it != activeShapes.end ())
+ {
+ DndShape *oneShape = it->second;
+ if (oneShape != NULL)
+ {
+ if (oneShape->IsSelected ())
+ toCopy += oneShape->GetShapeInfo ();
+ }
+ it++;
+ }
+
+ //printf("shape %s\n", (const char *)toCopy);
+ wxTheClipboard->UsePrimarySelection ();
+ if (wxTheClipboard->Open ())
+ {
+ wxTheClipboard->SetData (new wxTextDataObject (toCopy));
+ wxTheClipboard->Close ();
+ }
}
-void MyCanvas::ClipboardToScreen()
+void
+MyCanvas::ClipboardToScreen ()
{
- if (!wxTheClipboard->Open())
- return;
+ if (!wxTheClipboard->Open ())
+ return;
- activeShapes.UnselectAllShapes();
+ activeShapes.UnselectAllShapes ();
- if (wxTheClipboard->IsSupported( wxDF_TEXT )) {
- wxTextDataObject data;
- wxTheClipboard->GetData(data);
- activeShapes.AddNewShapes(data.GetText(), true);
- Refresh();
- }
- wxTheClipboard->Close();
-}
+ if (wxTheClipboard->IsSupported (wxDF_TEXT))
+ {
+ wxTextDataObject data;
+ wxTheClipboard->GetData (data);
+ activeShapes.AddNewShapes (data.GetText (), true);
+ }
+ wxTheClipboard->Close ();
+}
- void MyCanvas::OnChar(wxKeyEvent& event)
+void
+MyCanvas::OnChar (wxKeyEvent & event)
{
- wxString key;
- bool changedScreen = false;
- long keycode = event.GetKeyCode();
+ wxString key;
+ bool changedScreen = false;
+ long keycode = event.GetKeyCode ();
- if (keycode == WXK_DELETE) {
- RemoveSelectedShapes();
- changedScreen = true;
- }
-
- // printf ("keyocde is %d\n", keycode);
- if (event.ControlDown()) {
- // printf("Control is down\n");
- if (keycode == 99) { /* Process Ctrl - c */
- ScreenToClipboard();
- changedScreen = true;
- }
+ if (keycode == WXK_DELETE)
+ {
+ RemoveSelectedShapes ();
+ changedScreen = true;
+ }
- if ((keycode == WXK_INSERT) || (keycode == 118)) { /* Process Ctrl - v */
- ClipboardToScreen();
- changedScreen = true;
- }
+ // printf ("keyocde is %d\n", keycode);
+ if (event.ControlDown ())
+ {
+ // printf("Control is down\n");
+ if (keycode == 99)
+ { /* Process Ctrl - c */
+ ScreenToClipboard ();
+ changedScreen = true;
+ }
- }
+ if ((keycode == WXK_INSERT) || (keycode == 118))
+ { /* Process Ctrl - v */
+ ClipboardToScreen ();
+ changedScreen = true;
+ }
- if (changedScreen) {
- Refresh();
- event.Skip();
- return;
- }
+ }
+
+ if (changedScreen)
+ {
+ Refresh ();
+ event.Skip ();
+ return;
+ }
}
-void MyCanvas::ShapeInformationToFile(wxString & fileName)
+void
+MyCanvas::ShapeInformationToFile (wxString & fileName)
{
- wxString data;
+ wxString data;
- MyListShapes::iterator it = activeShapes.begin();
- while (it != activeShapes.end()) {
- DndShape *oneShape = it->second;
- if (oneShape != NULL) {
- data += oneShape->GetShapeInfo();
- }
- it++;
- }
-
- wxTextFile file(fileName);
-
- if (!file.Exists())
- file.Create();
- file.Open();
- if (!file.IsOpened()) {
- return;
- }
+ MyListShapes::iterator it = activeShapes.begin ();
+ while (it != activeShapes.end ())
+ {
+ DndShape *oneShape = it->second;
+ if (oneShape != NULL)
+ {
+ data += oneShape->GetShapeInfo ();
+ }
+ it++;
+ }
- file.Clear();
- file.AddLine(data);
- file.Write();
- file.Close();
+ wxTextFile file (fileName);
+
+ if (!file.Exists ())
+ file.Create ();
+ file.Open ();
+ if (!file.IsOpened ())
+ {
+ return;
+ }
+
+ file.Clear ();
+ file.AddLine (data);
+ file.Write ();
+ file.Close ();
}
-void MyCanvas::ReadShapeInformationFromFile(wxString & fileName)
+void
+MyCanvas::ReadShapeInformationFromFile (wxString & fileName)
{
- wxTextFile file(fileName);
- file.Open();
+ wxTextFile file (fileName);
+ file.Open ();
- if (!file.IsOpened()) {
- return;
- }
+ if (!file.IsOpened ())
+ {
+ return;
+ }
- wxString data;
- for (data = file.GetFirstLine(); !file.Eof();)
- data += wxString(file.GetEOL()) + file.GetNextLine();
+ wxString data;
+ for (data = file.GetFirstLine (); !file.Eof ();)
+ data += wxString (file.GetEOL ()) + file.GetNextLine ();
- file.Close();
+ file.Close ();
- RemoveCurrentShapes();
- activeShapes.AddNewShapes(data);
- Refresh();
+ RemoveCurrentShapes ();
+ activeShapes.AddNewShapes (data);
+ Refresh ();
}
-void MyCanvas::RemoveCurrentShapes()
-{
- selectingRegion.SetSelected(false);
- activeShapes.RemoveCurrentShapes();
+void
+MyCanvas::RemoveCurrentShapes ()
+{
+ selectingRegion.SetSelected (false);
+ activeShapes.RemoveCurrentShapes ();
}
-void MyCanvas::DisplayTextPopup(const wxString& text) //, const wxPoint& WXUNUSED(pos))
+void
+MyCanvas::DisplayTextPopup (const wxString & text) //, const wxPoint& WXUNUSED(pos))
{
#if wxUSE_TIPWINDOW
- // #warning "tip windows on "
- static wxString oldMessage;
- if (text == oldMessage)
- return;
- oldMessage = text;
+ // #warning "tip windows on "
+ static wxString oldMessage;
+ if (text == oldMessage)
+ return;
+ oldMessage = text;
- static wxTipWindow* s_tipWindow = NULL;
-
- if (s_tipWindow){
- // Prevent s_tipWindow being nulled in OnIdle,
- // thereby removing the chance for the window to be closed by ShowHelp
- s_tipWindow->SetTipWindowPtr(NULL);
- s_tipWindow->Close();
- }
- s_tipWindow = NULL;
-
- if ( !text.empty() ) {
- s_tipWindow = new wxTipWindow(wxTheApp->GetTopWindow(), text, 100, & s_tipWindow);
-
- return;
- }
+ static wxTipWindow *s_tipWindow = NULL;
+
+ if (s_tipWindow)
+ {
+ // Prevent s_tipWindow being nulled in OnIdle,
+ // thereby removing the chance for the window to be closed by ShowHelp
+ s_tipWindow->SetTipWindowPtr (NULL);
+ s_tipWindow->Close ();
+ }
+ s_tipWindow = NULL;
+
+ if (!text.empty ())
+ {
+ s_tipWindow =
+ new wxTipWindow (wxTheApp->GetTopWindow (), text, 100,
+ &s_tipWindow);
+
+ return;
+ }
#else
- wxUnusedVar(text);
+ wxUnusedVar (text);
#endif // wxUSE_TIPWINDOW
- }
+}
-void MyCanvas::SetEditingMode(EditingMode newMode)
+void
+MyCanvas::SetEditingMode (EditingMode newMode)
{
- if (newMode == editingMode)
- return;
+ if (newMode == editingMode)
+ return;
- editingMode = newMode;
- // printf("YES. set editing mode to %d\n\n", newMode);
- switch (newMode)
- {
- case WaitDownEvent:;
- {
- CloseJoinBlocks();
- pFrame->SetStatusText("Waiting for a mouse click event");
- }
- break;
- case DownEventNew:;
- {
- CloseJoinBlocks();
- pFrame->SetStatusText("Waiting for a mouse click event");
- }
- break;
- case PlaceOneShape:;
- {
- CloseJoinBlocks();
- wxString kindName = DndShape::GetKindName(pFrame->GetImageTypeForPlacing());
- wxString mess= wxString("Set the mouse at desired position to place a ") + kindName;
- pFrame->SetStatusText(mess);
- selectingRegion.SetSelected(false);
- activeShapes.UnselectAllShapes();
- }
- break;
- case SelectRectangle:;
- {
- CloseJoinBlocks();
- pFrame->SetStatusText("Mark a rectangle on screen, and select objects within");
- selectingRegion.SetOtherCorner(lastMouseDownPoint);
- selectingRegion.SetSelected(true);
- }
- break;
- case MovingShapes:;
- {
- CloseJoinBlocks();
- pFrame->SetStatusText("Moving one or more shapes on the screen");
- }
- break;
- case MovingShapesRectangle:;
- {
- CloseJoinBlocks();
- pFrame->SetStatusText("Moving one or more shapes, and a selecting rectangle, on the screen");
- }
- break;
- case PlaceJoinBlocks:;
- {
- pFrame->SetStatusText("Draw interconnecting logic flow between blocks on the screen");
- }
- break;
- default:
- {
- pFrame->SetStatusText("Should not be selected");
- }
- break;
- }
+ editingMode = newMode;
+ // printf("YES. set editing mode to %d\n\n", newMode);
+ switch (newMode)
+ {
+ case WaitDownEvent:;
+ {
+ CloseJoinBlocks ();
+ pFrame->SetStatusText
+ ("Waiting for a mouse click event");
+ }
+ break;
+ case DownEventNew:;
+ {
+ CloseJoinBlocks ();
+ pFrame->SetStatusText
+ ("Waiting for a mouse click event");
+ }
+ break;
+ case PlaceOneShape:;
+ {
+ CloseJoinBlocks ();
+ wxString kindName =
+ DndShape::GetKindName (pFrame->
+ GetImageTypeForPlacing
+ ());
+ wxString mess =
+ wxString
+ ("Set the mouse at desired position to place a ")
+ + kindName;
+ pFrame->SetStatusText (mess);
+ selectingRegion.SetSelected (false);
+ activeShapes.UnselectAllShapes ();
+ }
+ break;
+ case SelectRectangle:;
+ {
+ CloseJoinBlocks ();
+ pFrame->SetStatusText
+ ("Mark a rectangle on screen, and select objects within");
+ selectingRegion.SetOtherCorner (lastMouseDownPoint);
+ selectingRegion.SetSelected (true);
+ }
+ break;
+ case MovingShapes:;
+ {
+ CloseJoinBlocks ();
+ pFrame->SetStatusText
+ ("Moving one or more shapes on the screen");
+ }
+ break;
+ case MovingShapesRectangle:;
+ {
+ CloseJoinBlocks ();
+ pFrame->SetStatusText
+ ("Moving one or more shapes, and a selecting rectangle, on the screen");
+ }
+ break;
+ case PlaceJoinBlocks:;
+ {
+ pFrame->SetStatusText
+ ("Draw interconnecting logic flow between blocks on the screen");
+ }
+ break;
+ default:
+ {
+ pFrame->SetStatusText ("Should not be selected");
+ }
+ break;
+ }
}
-
-
-
Modified: sofaswitch/trunk/callflow/src/loadnewgraph.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/loadnewgraph.cpp (original)
+++ sofaswitch/trunk/callflow/src/loadnewgraph.cpp Wed Nov 8 22:51:30 2006
@@ -72,6 +72,7 @@
file.AddLine(" f = MyFactory() ");
file.AddLine(" f.isMaster = False ");
file.AddLine(" f.setGraph(fname) ");
+ file.AddLine(" f.setMaster(False) ");
file.AddLine(" reactor.connectTCP(sofaServer, 5000, f) ");
file.AddLine(" return self.data[a][\"Output\"] ");
file.AddLine("");
Modified: sofaswitch/trunk/callflow/src/shapelist.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/shapelist.cpp (original)
+++ sofaswitch/trunk/callflow/src/shapelist.cpp Wed Nov 8 22:51:30 2006
@@ -316,6 +316,13 @@
file.AddLine(tString.c_str());
file.AddLine(" ");
+ file.AddLine(" def setMaster(self, newIsMaster): ");
+ file.AddLine(" \"\"\"Set the flag to indicate if we have been spawned ");
+ file.AddLine(" as a child process, or if we are key launching ");
+ file.AddLine(" process that was invoked from the command line. ");
+ file.AddLine(" \"\"\" ");
+ file.AddLine(" self.isMaster = newIsMaster ");
+ file.AddLine(" ");
file.AddLine(" def setGraphData(self, graphFile): ");
file.AddLine(" \"\"\"Read in the file which describes where the flow ");
file.AddLine(" of execution goes, and variables associated with ");
@@ -540,13 +547,19 @@
file.AddLine(" p.factory = self ");
file.AddLine(" self.myController = p ");
file.AddLine(" self.myController.setGraphData(self.myGraphName) ");
+ file.AddLine(" self.myController.setMaster(self.isMaster) ");
file.AddLine(" return p ");
file.AddLine(" ");
file.AddLine(" def setGraph(self, newName): ");
file.AddLine(" self.myGraphName = newName ");
file.AddLine(" ");
+ file.AddLine(" def setMaster(self, newMaster): ");
+ file.AddLine(" self.isMaster = newMaster ");
+ file.AddLine(" ");
+ file.AddLine(" ");
file.AddLine("f = MyFactory() ");
file.AddLine(wxString::Format("f.setGraph(\"%s\") ", graphFileName.c_str()));
+ file.AddLine("f.setMaster(True) ");
file.AddLine("reactor.connectTCP(sofaServer, 5000, f) ");
file.AddLine("reactor.run() ");
file.AddLine(" ");
Modified: sofaswitch/trunk/callflow/tests/amplaywavfile.src
==============================================================================
--- sofaswitch/trunk/callflow/tests/amplaywavfile.src (original)
+++ sofaswitch/trunk/callflow/tests/amplaywavfile.src Wed Nov 8 22:51:30 2006
@@ -1,3 +1,3 @@
-9<B>632<B>318<B>632,366,638,319,685,318,685,330<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>821<B>356<B>821,357,977,357,1018,356<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>1<B>190<B>19<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>9<B>544<B>394<B>606,394,602,560,544,561<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>5<B>241<B>359<B> extra <special>Tool Tip<ms>Conditional<ms><special>Test (Python code)<ms>(self.amNode != None) and (self.soundNode != None)<ms><special> <B><Shape>17<B>516<B>509<B> extra <special>Tool Tip<ms>Write To File<ms><special>Filename to contain new audio (Python code)<ms>"recorded_audio.wav"<ms><special>answering machine node<ms>self.amNode<ms><special> <B><Shape>15<B>989<B>451<B> extra <special>Tool Tip<ms>Transfer Media<ms><special>First SofaSwitch worker (python)<ms>"sound"<ms><special>Second SofaSwitch worker (python)<ms>"sound"<ms><special> <B><Shape>14<B>202<B>162<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>amREQ<ms><special>Python variable to hold event data<ms>self.amNode<ms><special> <B><Shape>2<B>307<B>394<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>14<B>295<B>185<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>soundREQU<ms><special>Python variable to hold event data<ms>self.soundNode<ms><special> <B><Shape>9<B>559<B>339<B>559,339,604,342<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>16<B>516<B>561<B> extra <special>Tool Tip<ms>initial wav file<ms><special>Filename to read audio from (Python code)<ms>"../prompts/instructions.wav"<ms><special>answering machine node<ms>self.amNode<ms><special> <B><Shape>20<B>529<B>662<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>9<B>712<B>318<B>712,358,755,361,750,320,793,318,798,333<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>16<B>505<B>364<B> extra <special>Tool Tip<ms>Read From File<ms><special>Filename to read audio from (Python code)<ms>"../prompts/sample_message.wav"<ms><special>answering machine node<ms>self.amNode<ms><special> <B><Shape>5<B>991<B>358<B> extra <special>Tool Tip<ms>Conditional<ms><special>Test (Python code)<ms>self.dtmfData=="9"<ms><special> <B><Shape>10<B>990<B>405<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "hangup, as dtmf 9 has been received"<ms><special> <B><Shape>9<B>266<B>329<B>308,329,266,359<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>2<B>505<B>398<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>9<B>264<B>199<B>264,513,264,635,426,639,428,199,532,202,532,262<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>13<B>190<B>210<B> extra <special>Tool Tip<ms>Stop Timer<ms><special>Timer to stop<ms>request voip<ms><special> <B><Shape>10<B>190<B>254<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "Have a new am node on ", self.amNode<ms><special> <B><Shape>13<B>284<B>231<B> extra <special>Tool Tip<ms>Stop Timer<ms><special>Timer to stop<ms>request sound<ms><special> <B><Shape>15<B>240<B>412<B> extra <special>Tool Tip<ms>Transfer Media<ms><special>First SofaSwitch worker (python)<ms>self.amNode<ms><special>Second SofaSwitch worker (python)<ms>self.soundNode<ms><special> <B><Shape>9<B>302<B>485<B>302,485,544,492,542,506<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>5<B>770<B>331<B> extra <special>Tool Tip<ms>play leaving sound<ms><special>Test (Python code)<ms>self.dtmfData=="3"<ms><special> <B><Shape>5<B>660<B>332<B> extra <special>Tool Tip<ms>play entering sound<ms><special>Test (Python code)<ms>self.dtmfData=="2"<ms><special> <B><Shape>5<B>507<B>312<B> extra <special>Tool Tip<ms>Test Roger voice<ms><special>Test (Python code)<ms>self.dtmfData=="1"<ms><special> <B><Shape>2<B>659<B>427<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>2<B>1058<B>385<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>5<B>581<B>341<B> extra <special>Tool Tip<ms>Repeat instructions<ms><special>Test (Python code)<ms>self.dtmfData=="4"<ms><special> <B><Shape>11<B>190<B>68<B> extra <special>Tool Tip<ms>Request Node<ms><special>Request node from<ms>am<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>requestam<ms><special> <B><Shape>10<B>507<B>259<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "dtmf received of ", self.dtmfData<ms><special> <B><Shape>14<B>529<B>614<B> extra <special>Tool Tip<ms>Catch the timer which, when fired,
-indicates the end of this call<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>hanguptime<ms><special>Python variable to hold event data<ms>self.hanguptime<ms><special> <B><Shape>16<B>659<B>379<B> extra <special>Tool Tip<ms>play entering sound<ms><special>Filename to read audio from (Python code)<ms>"../prompts/entering.wav"<ms><special>answering machine node (Python code)<ms>self.amNode<ms><special> <B><Shape>9<B>291<B>382<B>291,386,334,382,332,395<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>2<B>769<B>426<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>14<B>251<B>461<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>DTMF<ms><special>Python variable to hold event data<ms>self.dtmfData<ms><special> <B><Shape>7<B>989<B>497<B> extra <special>Tool Tip<ms>End Call<ms><special>Worker node to activate (python code)<ms>self.amNode<ms><special> <B><Shape>10<B>282<B>279<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print " have a sound node of ", self.soundNode<ms><special> <B><Shape>12<B>990<B>549<B> extra <special>Tool Tip<ms>Initiate a timer, which causes this to
-end.<ms><special>Timer period (seconds)<ms>0.1<ms><special>Timer label (string literal)<ms>hanguptime<ms><special> <B><Shape>9<B>1039<B>386<B>1039,386,1082,387<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>248<B>182<B>248,183,308,182<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>214<B>304<B>214,304,262,356<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>16<B>770<B>378<B> extra <special>Tool Tip<ms>play leaving sound<ms><special>Filename to read audio from (Python code)<ms>"../prompts/leaving.wav"<ms><special>answering machine node (Python code)<ms>self.amNode<ms><special> <B><Shape>11<B>189<B>117<B> extra <special>Tool Tip<ms>Request Node<ms><special>Request node from<ms>sound<ms><special>Timer period (seconds)<ms>2<ms><special>Timer label<ms>request sound<ms><special> <B><Shape>2<B>991<B>588<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>
+12<B>990<B>549<B> extra <special>Tool Tip<ms>Initiate a timer, which causes this to
+end.<ms><special>Timer period (seconds)<ms>0.1<ms><special>Timer label (string literal)<ms>hanguptime<ms><special> <B><Shape>14<B>251<B>461<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>DTMF<ms><special>Python variable to hold event data<ms>self.dtmfData<ms><special> <B><Shape>16<B>505<B>364<B> extra <special>Tool Tip<ms>Play Rogers voice<ms><special>Filename to read audio from (Python code)<ms>"../prompts/sample_message.wav"<ms><special>answering machine node<ms>self.amNode<ms><special> <B><Shape>16<B>516<B>561<B> extra <special>Tool Tip<ms>initial wav file<ms><special>Filename to read audio from (Python code)<ms>"../prompts/instructions.wav"<ms><special>answering machine node<ms>self.amNode<ms><special> <B><Shape>2<B>769<B>426<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>9<B>559<B>339<B>559,339,604,342<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>11<B>191<B>67<B> extra <special>Tool Tip<ms>Request Node from AM module<ms><special>Request node from (Python code)<ms>"am"<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>requestam<ms><special>Additional information (Python code)<ms><ms><special> <B><Shape>5<B>660<B>332<B> extra <special>Tool Tip<ms>play entering sound<ms><special>Test (Python code)<ms>self.dtmfData=="2"<ms><special> <B><Shape>5<B>241<B>359<B> extra <special>Tool Tip<ms>Conditional<ms><special>Test (Python code)<ms>(self.amNode != None) and (self.soundNode != None)<ms><special> <B><Shape>10<B>507<B>259<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "dtmf received of ", self.dtmfData<ms><special> <B><Shape>20<B>529<B>662<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>13<B>190<B>210<B> extra <special>Tool Tip<ms>Stop Timer<ms><special>Timer to stop<ms>request voip<ms><special> <B><Shape>7<B>989<B>497<B> extra <special>Tool Tip<ms>End Call<ms><special>Worker node to activate (python code)<ms>self.amNode<ms><special> <B><Shape>9<B>1039<B>386<B>1039,386,1082,387<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>5<B>507<B>312<B> extra <special>Tool Tip<ms>Test Roger voice<ms><special>Test (Python code)<ms>self.dtmfData=="1"<ms><special> <B><Shape>9<B>266<B>329<B>308,329,266,359<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>13<B>284<B>231<B> extra <special>Tool Tip<ms>Stop Timer<ms><special>Timer to stop<ms>request sound<ms><special> <B><Shape>9<B>712<B>318<B>712,358,755,361,750,320,793,318,798,333<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>291<B>382<B>291,386,334,382,332,395<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>5<B>581<B>341<B> extra <special>Tool Tip<ms>Repeat instructions<ms><special>Test (Python code)<ms>self.dtmfData=="4"<ms><special> <B><Shape>10<B>990<B>405<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "hangup, as dtmf 9 has been received"<ms><special> <B><Shape>9<B>632<B>318<B>632,366,638,319,685,318,685,330<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>14<B>202<B>162<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>amREQ<ms><special>Python variable to hold event data<ms>self.amNode<ms><special> <B><Shape>9<B>214<B>304<B>214,304,262,356<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>15<B>240<B>412<B> extra <special>Tool Tip<ms>Transfer Media<ms><special>First SofaSwitch worker (python)<ms>self.amNode<ms><special>Second SofaSwitch worker (python)<ms>self.soundNode<ms><special> <B><Shape>2<B>659<B>427<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>15<B>989<B>451<B> extra <special>Tool Tip<ms>Transfer Media<ms><special>First SofaSwitch worker (python)<ms>"sound"<ms><special>Second SofaSwitch worker (python)<ms>"sound"<ms><special> <B><Shape>14<B>295<B>185<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>soundREQU<ms><special>Python variable to hold event data<ms>self.soundNode<ms><special> <B><Shape>9<B>302<B>485<B>302,485,544,492,542,506<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>821<B>356<B>821,357,977,357,1018,356<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>5<B>770<B>331<B> extra <special>Tool Tip<ms>play leaving sound<ms><special>Test (Python code)<ms>self.dtmfData=="3"<ms><special> <B><Shape>14<B>529<B>614<B> extra <special>Tool Tip<ms>Catch the timer which, when fired,
+indicates the end of this call<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>hanguptime<ms><special>Python variable to hold event data<ms>self.hanguptime<ms><special> <B><Shape>9<B>248<B>182<B>248,183,308,182<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>17<B>516<B>509<B> extra <special>Tool Tip<ms>Write To File<ms><special>Filename to contain new audio (Python code)<ms>"recorded_audio.wav"<ms><special>answering machine node<ms>self.amNode<ms><special> <B><Shape>16<B>659<B>379<B> extra <special>Tool Tip<ms>play entering sound<ms><special>Filename to read audio from (Python code)<ms>"../prompts/entering.wav"<ms><special>answering machine node (Python code)<ms>self.amNode<ms><special> <B><Shape>5<B>991<B>358<B> extra <special>Tool Tip<ms>Conditional<ms><special>Test (Python code)<ms>self.dtmfData=="9"<ms><special> <B><Shape>10<B>190<B>254<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "Have a new am node on ", self.amNode<ms><special> <B><Shape>9<B>544<B>394<B>606,394,602,560,544,561<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>2<B>505<B>398<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>2<B>1058<B>385<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>10<B>282<B>279<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print " have a sound node of ", self.soundNode<ms><special> <B><Shape>2<B>307<B>394<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>16<B>770<B>378<B> extra <special>Tool Tip<ms>play leaving sound<ms><special>Filename to read audio from (Python code)<ms>"../prompts/leaving.wav"<ms><special>answering machine node (Python code)<ms>self.amNode<ms><special> <B><Shape>2<B>991<B>588<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>9<B>264<B>199<B>264,513,264,635,426,639,428,199,532,202,532,262<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>1<B>190<B>19<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>11<B>191<B>109<B> extra <special>Tool Tip<ms>Request Node from sound module<ms><special>Request node from (Python code)<ms>"sound"<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>requestsound<ms><special>Additional information (Python code)<ms><ms><special> <B><Shape>
Modified: sofaswitch/trunk/callflow/tests/dtmf_from_sound.src
==============================================================================
--- sofaswitch/trunk/callflow/tests/dtmf_from_sound.src (original)
+++ sofaswitch/trunk/callflow/tests/dtmf_from_sound.src Wed Nov 8 22:51:30 2006
@@ -1 +1 @@
-2<B>320<B>493<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>5<B>108<B>450<B> extra <special>Tool Tip<ms>Conditional<ms><special>Test (Python code)<ms>self.dtmfData=="*"<ms><special> <B><Shape>10<B>108<B>407<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "DTMF detected is ", self.dtmfData<ms><special> <B><Shape>20<B>120<B>491<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>9<B>130<B>361<B>258,390,131,361,130,363<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>14<B>246<B>251<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>REQ<ms><special>Python variable to hold event data<ms>self.newNode<ms><special> <B><Shape>11<B>232<B>159<B> extra <special>Tool Tip<ms>Request Node<ms><special>Request node from<ms>sound<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>requestnode<ms><special> <B><Shape>14<B>334<B>283<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>requestnode<ms><special>Python variable to hold event data<ms>self.timerData<ms><special> <B><Shape>1<B>231<B>108<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>9<B>157<B>475<B>157,475,347,493<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>13<B>231<B>340<B> extra <special>Tool Tip<ms>Stop Timer<ms><special>Timer to stop<ms>requestnode<ms><special> <B><Shape>9<B>345<B>370<B>348,370,345,494<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>10<B>323<B>322<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "timer has expired at ", time.asctime(), " ", self.timerData<ms><special> <B><Shape>10<B>231<B>295<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "have a new node on ", self.newNode<ms><special> <B><Shape>9<B>295<B>275<B>295,275,348,279<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>14<B>120<B>365<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>DTMF<ms><special>Python variable to hold event data<ms>self.dtmfData<ms><special> <B><Shape>10<B>232<B>204<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "Have requested a node from sound at ", time.asctime()<ms><special> <B><Shape>
+9<B>335<B>274<B>338,274,335,398<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>1<B>221<B>12<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>11<B>222<B>64<B> extra <special>Tool Tip<ms>Request Node<ms><special>Request node from (Python code)<ms>"sound"<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>requestnode<ms><special>Additional information (Python code)<ms><ms><special> <B><Shape>9<B>120<B>265<B>248,294,121,265,120,267<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>147<B>379<B>147,379,337,397<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>285<B>179<B>285,179,338,183<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>10<B>221<B>199<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "have a new node on ", self.newNode<ms><special> <B><Shape>14<B>324<B>187<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>requestnode<ms><special>Python variable to hold event data<ms>self.timerData<ms><special> <B><Shape>20<B>110<B>395<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>5<B>98<B>354<B> extra <special>Tool Tip<ms>Conditional<ms><special>Test (Python code)<ms>self.dtmfData=="*"<ms><special> <B><Shape>14<B>236<B>155<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>REQ<ms><special>Python variable to hold event data<ms>self.newNode<ms><special> <B><Shape>10<B>313<B>226<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "timer has expired at ", time.asctime(), " ", self.timerData<ms><special> <B><Shape>10<B>222<B>108<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "Have requested a node from sound at ", time.asctime()<ms><special> <B><Shape>10<B>98<B>311<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "DTMF detected is ", self.dtmfData<ms><special> <B><Shape>14<B>110<B>269<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>DTMF<ms><special>Python variable to hold event data<ms>self.dtmfData<ms><special> <B><Shape>2<B>310<B>397<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>13<B>221<B>244<B> extra <special>Tool Tip<ms>Stop Timer<ms><special>Timer to stop<ms>requestnode<ms><special> <B><Shape>
Modified: sofaswitch/trunk/callflow/tests/forloop.src
==============================================================================
--- sofaswitch/trunk/callflow/tests/forloop.src (original)
+++ sofaswitch/trunk/callflow/tests/forloop.src Wed Nov 8 22:51:30 2006
@@ -1 +1 @@
-10<B>307<B>108<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "loop index is ", self.i<ms><special> <B><Shape>3<B>299<B>62<B> extra <special>Tool Tip<ms>Start For<ms><special>Initialise (Python code)<ms>self.i = 0<ms><special>Test for Termination (Python code)<ms>self.i < 10<ms><special>Increment (Python code)<ms>self.i+=1<ms><special> <B><Shape>1<B>306<B>11<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>20<B>322<B>199<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>4<B>301<B>152<B> extra <special>Tool Tip<ms>End For Loop<ms><special> <B><Shape>9<B>258<B>84<B>296,87,258,84,259,174,299,178<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>
+4<B>301<B>152<B> extra <special>Tool Tip<ms>End For Loop<ms><special> <B><Shape>1<B>306<B>11<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>3<B>299<B>62<B> extra <special>Tool Tip<ms>Start For<ms><special>Initialise (Python code)<ms>self.i = 0<ms><special>Test for Termination (Python code)<ms>self.i < 10<ms><special>Increment (Python code)<ms>self.i+=1<ms><special> <B><Shape>20<B>322<B>199<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>10<B>307<B>108<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "loop index is ", self.i<ms><special> <B><Shape>9<B>258<B>84<B>296,87,258,84,259,174,299,178<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>
Modified: sofaswitch/trunk/callflow/tests/loadgraph.src
==============================================================================
--- sofaswitch/trunk/callflow/tests/loadgraph.src (original)
+++ sofaswitch/trunk/callflow/tests/loadgraph.src Wed Nov 8 22:51:30 2006
@@ -1 +1 @@
-12<B>378<B>172<B> extra <special>Tool Tip<ms>Timer<ms><special>Timer period (seconds)<ms>2<ms><special>Timer label (string literal)<ms>endloadgraph<ms><special> <B><Shape>1<B>379<B>35<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>20<B>391<B>305<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>18<B>378<B>79<B> extra <special>Tool Tip<ms>Load New Graph<ms><special>new graph file (Python code)<ms>"am_test.graph"<ms><special> <B><Shape>10<B>378<B>126<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "have generated the new graph"<ms><special> <B><Shape>14<B>389<B>221<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>endloadgraph<ms><special>Python variable to hold event data<ms>self.eventData<ms><special> <B><Shape>10<B>377<B>262<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "end the master now"<ms><special> <B><Shape>
+10<B>378<B>126<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "have generated the new graph"<ms><special> <B><Shape>20<B>391<B>305<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>1<B>379<B>35<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>18<B>378<B>79<B> extra <special>Tool Tip<ms>Load New Graph<ms><special>new graph file (Python code)<ms>"am_test.graph"<ms><special> <B><Shape>14<B>389<B>221<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>endloadgraph<ms><special>Python variable to hold event data<ms>self.eventData<ms><special> <B><Shape>12<B>378<B>172<B> extra <special>Tool Tip<ms>Timer<ms><special>Timer period (seconds)<ms>20<ms><special>Timer label (string literal)<ms>endloadgraph<ms><special> <B><Shape>10<B>377<B>262<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "end the master now"<ms><special> <B><Shape>
Modified: sofaswitch/trunk/callflow/tests/makevoipcall.src
==============================================================================
--- sofaswitch/trunk/callflow/tests/makevoipcall.src (original)
+++ sofaswitch/trunk/callflow/tests/makevoipcall.src Wed Nov 8 22:51:30 2006
@@ -1,3 +1,3 @@
-9<B>248<B>182<B>248,183,308,182<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>2<B>44<B>394<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>12<B>43<B>349<B> extra <special>Tool Tip<ms>Initiate a timer, which causes this to
-end.<ms><special>Timer period (seconds)<ms>0.1<ms><special>Timer label (string literal)<ms>hanguptime<ms><special> <B><Shape>7<B>42<B>303<B> extra <special>Tool Tip<ms>End Call<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special> <B><Shape>2<B>307<B>394<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>13<B>284<B>231<B> extra <special>Tool Tip<ms>Stop Timer<ms><special>Timer to stop<ms>request sound<ms><special> <B><Shape>1<B>190<B>19<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>15<B>42<B>257<B> extra <special>Tool Tip<ms>Transfer Media<ms><special>First SofaSwitch worker (python)<ms>"sound"<ms><special>Second SofaSwitch worker (python)<ms>"sound"<ms><special> <B><Shape>5<B>241<B>359<B> extra <special>Tool Tip<ms>Conditional<ms><special>Test (Python code)<ms>(self.voipNode != None) and (self.soundNode != None)<ms><special> <B><Shape>11<B>189<B>117<B> extra <special>Tool Tip<ms>Request Node<ms><special>Request node from<ms>sound<ms><special>Timer period (seconds)<ms>2<ms><special>Timer label<ms>request sound<ms><special> <B><Shape>10<B>239<B>508<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "dtmf received of ", self.dtmfData<ms><special> <B><Shape>11<B>190<B>68<B> extra <special>Tool Tip<ms>Request Node<ms><special>Request node from<ms>voip<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>request voip<ms><special> <B><Shape>13<B>190<B>260<B> extra <special>Tool Tip<ms>Stop Timer<ms><special>Timer to stop<ms>request voip<ms><special> <B><Shape>9<B>266<B>329<B>308,329,266,359<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>6<B>191<B>209<B> extra <special>Tool Tip<ms>Make Call<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special>Call destination (python code)<ms>"h323:h323.voxgratia.org"<ms><special> <B><Shape>9<B>217<B>357<B>217,357,265,359<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>291<B>382<B>291,386,334,382,332,395<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>10<B>43<B>211<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "hangup, as dtmf 9 has been received"<ms><special> <B><Shape>20<B>368<B>626<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>9<B>302<B>486<B>302,486,376,486,380,579<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>5<B>240<B>549<B> extra <special>Tool Tip<ms>Conditional<ms><special>Test (Python code)<ms>self.dtmfData=="9"<ms><special> <B><Shape>15<B>240<B>412<B> extra <special>Tool Tip<ms>Transfer Media<ms><special>First SofaSwitch worker (python)<ms>self.voipNode<ms><special>Second SofaSwitch worker (python)<ms>self.soundNode<ms><special> <B><Shape>14<B>295<B>185<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>soundREQU<ms><special>Python variable to hold event data<ms>self.soundNode<ms><special> <B><Shape>14<B>202<B>162<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>voipREQ<ms><special>Python variable to hold event data<ms>self.voipNode<ms><special> <B><Shape>2<B>266<B>623<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>9<B>63<B>173<B>262,598,139,599,141,173,63,174,67,213<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>10<B>190<B>308<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "Have a new voip node on ", self.voipNode<ms><special> <B><Shape>14<B>367<B>581<B> extra <special>Tool Tip<ms>Catch the timer which, when fired,
-indicates the end of this call<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>hanguptime<ms><special>Python variable to hold event data<ms>self.hanguptime<ms><special> <B><Shape>19<B>267<B>578<B> extra <special>Tool Tip<ms>Send Dtmf<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special>DTMF to send to worker node (python code)<ms>self.dtmfData<ms><special> <B><Shape>10<B>282<B>279<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print " have a sound node of ", self.soundNode<ms><special> <B><Shape>14<B>251<B>463<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>DTMF<ms><special>Python variable to hold event data<ms>self.dtmfData<ms><special> <B><Shape>
+13<B>190<B>260<B> extra <special>Tool Tip<ms>Stop Timer<ms><special>Timer to stop<ms>requestvoip<ms><special> <B><Shape>13<B>284<B>231<B> extra <special>Tool Tip<ms>Stop Timer<ms><special>Timer to stop<ms>requestsound<ms><special> <B><Shape>9<B>302<B>486<B>302,486,376,486,380,579<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>11<B>191<B>109<B> extra <special>Tool Tip<ms>Request Node<ms><special>Request node from (Python code)<ms>"sound"<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>requestsound<ms><special>Additional information (Python code)<ms><ms><special> <B><Shape>14<B>251<B>463<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>DTMF<ms><special>Python variable to hold event data<ms>self.dtmfData<ms><special> <B><Shape>2<B>44<B>394<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>9<B>217<B>357<B>217,357,265,359<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>12<B>43<B>349<B> extra <special>Tool Tip<ms>Initiate a timer, which causes this to
+end.<ms><special>Timer period (seconds)<ms>0.1<ms><special>Timer label (string literal)<ms>hanguptime<ms><special> <B><Shape>10<B>190<B>308<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "Have a new voip node on ", self.voipNode<ms><special> <B><Shape>9<B>266<B>329<B>308,329,266,359<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>14<B>295<B>185<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>soundREQU<ms><special>Python variable to hold event data<ms>self.soundNode<ms><special> <B><Shape>2<B>307<B>394<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>10<B>43<B>211<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "hangup, as dtmf 9 has been received"<ms><special> <B><Shape>1<B>190<B>19<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>10<B>239<B>508<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "dtmf received of ", self.dtmfData<ms><special> <B><Shape>9<B>63<B>173<B>262,598,139,599,141,173,63,174,67,213<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>14<B>202<B>162<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>voipREQ<ms><special>Python variable to hold event data<ms>self.voipNode<ms><special> <B><Shape>11<B>191<B>71<B> extra <special>Tool Tip<ms>Request Node<ms><special>Request node from (Python code)<ms>"voip"<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>requestvoip<ms><special>Additional information (Python code)<ms><ms><special> <B><Shape>20<B>368<B>626<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>19<B>267<B>578<B> extra <special>Tool Tip<ms>Send Dtmf<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special>DTMF to send to worker node (python code)<ms>self.dtmfData<ms><special> <B><Shape>6<B>191<B>209<B> extra <special>Tool Tip<ms>Make Call<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special>Call destination (python code)<ms>"h323:h323.voxgratia.org"<ms><special> <B><Shape>9<B>291<B>382<B>291,386,334,382,332,395<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>15<B>240<B>412<B> extra <special>Tool Tip<ms>Transfer Media<ms><special>First SofaSwitch worker (python)<ms>self.voipNode<ms><special>Second SofaSwitch worker (python)<ms>self.soundNode<ms><special> <B><Shape>15<B>42<B>257<B> extra <special>Tool Tip<ms>Transfer Media<ms><special>First SofaSwitch worker (python)<ms>"sound"<ms><special>Second SofaSwitch worker (python)<ms>"sound"<ms><special> <B><Shape>7<B>42<B>303<B> extra <special>Tool Tip<ms>End Call<ms><special>Worker node to activate (python code)<ms>self.voipNode<ms><special> <B><Shape>2<B>266<B>623<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>9<B>248<B>182<B>248,183,308,182<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>14<B>367<B>581<B> extra <special>Tool Tip<ms>Catch the timer which, when fired,
+indicates the end of this call<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>hanguptime<ms><special>Python variable to hold event data<ms>self.hanguptime<ms><special> <B><Shape>5<B>241<B>359<B> extra <special>Tool Tip<ms>Conditional<ms><special>Test (Python code)<ms>(self.voipNode != None) and (self.soundNode != None)<ms><special> <B><Shape>10<B>282<B>279<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print " have a sound node of ", self.soundNode<ms><special> <B><Shape>5<B>240<B>549<B> extra <special>Tool Tip<ms>Conditional<ms><special>Test (Python code)<ms>self.dtmfData=="9"<ms><special> <B><Shape>
Modified: sofaswitch/trunk/callflow/tests/requestnode.src
==============================================================================
--- sofaswitch/trunk/callflow/tests/requestnode.src (original)
+++ sofaswitch/trunk/callflow/tests/requestnode.src Wed Nov 8 22:51:30 2006
@@ -1 +1 @@
-14<B>336<B>282<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>requestnode<ms><special>Python variable to hold event data<ms>self.timerData<ms><special> <B><Shape>1<B>231<B>157<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>2<B>323<B>370<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>13<B>231<B>340<B> extra <special>Tool Tip<ms>Stop Timer<ms><special>Timer to stop<ms>requestnode<ms><special> <B><Shape>10<B>231<B>295<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "have a new node on ", self.eventData<ms><special> <B><Shape>20<B>245<B>386<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>11<B>231<B>208<B> extra <special>Tool Tip<ms>Request Node<ms><special>Request node from<ms>voip<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>requestnode<ms><special> <B><Shape>14<B>244<B>255<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>NEWID<ms><special>Python variable to hold event data<ms>self.eventData<ms><special> <B><Shape>9<B>290<B>279<B>290,280,350,279<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>10<B>323<B>322<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "timer has expired at ", time.asctime(), " from ", self.timerData<ms><special> <B><Shape>
+14<B>244<B>255<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>NEWID<ms><special>Python variable to hold event data<ms>self.eventData<ms><special> <B><Shape>13<B>231<B>340<B> extra <special>Tool Tip<ms>Stop Timer<ms><special>Timer to stop<ms>requestnode<ms><special> <B><Shape>2<B>323<B>370<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>20<B>245<B>386<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>10<B>323<B>322<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "timer has expired at ", time.asctime(), " from ", self.timerData<ms><special> <B><Shape>10<B>231<B>295<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "have a new node on ", self.eventData<ms><special> <B><Shape>9<B>290<B>279<B>290,280,350,279<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>1<B>231<B>157<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>11<B>232<B>206<B> extra <special>Tool Tip<ms>Request Node<ms><special>Request node from (Python code)<ms>"voip"<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>request node<ms><special>Additional information (Python code)<ms><ms><special> <B><Shape>14<B>336<B>282<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>request node<ms><special>Python variable to hold event data<ms>self.timerData<ms><special> <B><Shape>
Modified: sofaswitch/trunk/callflow/tests/simpleeventer.src
==============================================================================
--- sofaswitch/trunk/callflow/tests/simpleeventer.src (original)
+++ sofaswitch/trunk/callflow/tests/simpleeventer.src Wed Nov 8 22:51:30 2006
@@ -1 +1 @@
-10<B>287<B>172<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "have received a new node ", self.newNode<ms><special> <B><Shape>20<B>300<B>324<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>2<B>327<B>251<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>10<B>326<B>202<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print " Finished main stream of execution "<ms><special> <B><Shape>9<B>349<B>148<B>349,148,351,201<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>1<B>285<B>27<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>11<B>286<B>78<B> extra <special>Tool Tip<ms>Request Node<ms><special>Request node from<ms>voip<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>requestnode<ms><special> <B><Shape>14<B>301<B>125<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>REQ<ms><special>Python variable to hold event data<ms>self.newNode<ms><special> <B><Shape>9<B>312<B>219<B>312,219,312,326<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>
+1<B>285<B>27<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>9<B>312<B>219<B>312,219,312,326<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>10<B>326<B>202<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print " Finished main stream of execution "<ms><special> <B><Shape>11<B>287<B>76<B> extra <special>Tool Tip<ms>Request Node<ms><special>Request node from (Python code)<ms>"voip"<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>requestnode<ms><special>Additional information (Python code)<ms><ms><special> <B><Shape>10<B>287<B>172<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "have received a new node ", self.newNode<ms><special> <B><Shape>2<B>327<B>251<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>14<B>301<B>125<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>REQ<ms><special>Python variable to hold event data<ms>self.newNode<ms><special> <B><Shape>20<B>300<B>324<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>9<B>349<B>148<B>349,148,351,201<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>
Modified: sofaswitch/trunk/callflow/tests/timetest.src
==============================================================================
--- sofaswitch/trunk/callflow/tests/timetest.src (original)
+++ sofaswitch/trunk/callflow/tests/timetest.src Wed Nov 8 22:51:30 2006
@@ -1 +1 @@
-14<B>220<B>256<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>timer2<ms><special>Python variable to hold event data<ms>self.timer2<ms><special> <B><Shape>14<B>347<B>327<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>10<ms><special>Python variable to hold event data<ms>self.timer3<ms><special> <B><Shape>20<B>346<B>417<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>12<B>127<B>125<B> extra <special>Tool Tip<ms>Timer<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>timer1<ms><special> <B><Shape>10<B>123<B>74<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "Start ", time.asctime()<ms><special> <B><Shape>10<B>334<B>370<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "t10 ", time.asctime(), " data is ", self.timer3<ms><special> <B><Shape>10<B>126<B>221<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "t1 ", time.asctime(), " data is ", self.timer1Data<ms><special> <B><Shape>12<B>207<B>202<B> extra <special>Tool Tip<ms>Timer<ms><special>Timer period (seconds)<ms>2<ms><special>Timer label<ms>timer2<ms><special> <B><Shape>10<B>207<B>305<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "t2 ", time.asctime(), " data is ", self.timer2<ms><special> <B><Shape>9<B>270<B>278<B>270,280,359,278<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>12<B>335<B>275<B> extra <special>Tool Tip<ms>Timer<ms><special>Timer period (seconds)<ms>10<ms><special>Timer label (string literal)<ms>t10<ms><special> <B><Shape>9<B>231<B>351<B>232,351,231,422<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>2<B>204<B>419<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>1<B>123<B>26<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>14<B>139<B>179<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>timer1<ms><special>Python variable to hold event data<ms>self.timer1Data<ms><special> <B><Shape>9<B>150<B>271<B>150,271,152,406,223,407,229,423<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>9<B>188<B>201<B>188,201,231,202<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>
+12<B>335<B>275<B> extra <special>Tool Tip<ms>Timer<ms><special>Timer period (seconds)<ms>10<ms><special>Timer label (string literal)<ms>t10<ms><special> <B><Shape>10<B>334<B>370<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "t10 ", time.asctime(), " data is ", self.timer3<ms><special> <B><Shape>2<B>204<B>419<B> extra <special>Tool Tip<ms>End Processing<ms><special> <B><Shape>10<B>126<B>221<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "t1 ", time.asctime(), " data is ", self.timer1Data<ms><special> <B><Shape>9<B>231<B>351<B>232,351,231,422<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>12<B>207<B>202<B> extra <special>Tool Tip<ms>Timer<ms><special>Timer period (seconds)<ms>2<ms><special>Timer label<ms>timer2<ms><special> <B><Shape>14<B>139<B>179<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>timer1<ms><special>Python variable to hold event data<ms>self.timer1Data<ms><special> <B><Shape>9<B>188<B>201<B>188,201,231,202<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>20<B>346<B>417<B> extra <special>Tool Tip<ms>Death<ms><special> <B><Shape>12<B>127<B>125<B> extra <special>Tool Tip<ms>Timer<ms><special>Timer period (seconds)<ms>1<ms><special>Timer label<ms>timer1<ms><special> <B><Shape>10<B>207<B>305<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "t2 ", time.asctime(), " data is ", self.timer2<ms><special> <B><Shape>10<B>123<B>74<B> extra <special>Tool Tip<ms>Python<ms><special>Python Code<ms>print "Start ", time.asctime()<ms><special> <B><Shape>1<B>123<B>26<B> extra <special>Tool Tip<ms>Start Processing<ms><special> <B><Shape>9<B>150<B>271<B>150,271,152,406,223,407,229,423<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>14<B>347<B>327<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>10<ms><special>Python variable to hold event data<ms>self.timer3<ms><special> <B><Shape>9<B>270<B>278<B>270,280,359,278<special>Tool Tip<ms>Join blocks shape<ms><special> <B><Shape>14<B>220<B>256<B> extra <special>Tool Tip<ms>Eventer<ms><special>Event sought (Python code)<ms><ms><special>Event sought (Regular Exp)<ms>timer2<ms><special>Python variable to hold event data<ms>self.timer2<ms><special> <B><Shape>
1
0
Author: derek
Date: Mon Nov 6 22:09:32 2006
New Revision: 160
Modified:
sofaswitch/trunk/callflow/src/callflow.cpp
sofaswitch/trunk/callflow/src/death.cpp
sofaswitch/trunk/callflow/src/requestnode.cpp
sofaswitch/trunk/callflow/src/shapelist.cpp
Log:
get the close down to work correctly (I think)
Get the requesting of a node to work, particularly when passing additional information.
Requesting of a node works when supplied text is a string (with quotes) or
consists of python variables.
Modified: sofaswitch/trunk/callflow/src/callflow.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/callflow.cpp (original)
+++ sofaswitch/trunk/callflow/src/callflow.cpp Mon Nov 6 22:09:32 2006
@@ -309,7 +309,7 @@
toolBar->AddTool(wxH_FILEOPEN, wxBitmap ( FileOpen_xpm ), wxT("open a file"));
toolBar->AddTool(wxH_FILESAVE, wxBitmap ( FileSave_xpm ), wxT("Save to the current file"));
toolBar->AddTool(wxH_FILESAVE__AS, wxBitmap ( FileSave_As_xpm ), wxT("Save to the file you specify"));
- toolBar->AddTool(wxH_FILEE_XIT, wxBitmap ( FileE_xit_xpm ), wxT(""));
+ toolBar->AddTool(wxH_FILEE_XIT, wxBitmap ( FileE_xit_xpm ), wxT("End this program now"));
toolBar->AddTool(wxH_CONTROLSCOMPILE, wxBitmap ( compile_xpm ), wxT("Compile to code"));
toolBar->AddSeparator() ;
Modified: sofaswitch/trunk/callflow/src/death.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/death.cpp (original)
+++ sofaswitch/trunk/callflow/src/death.cpp Mon Nov 6 22:09:32 2006
@@ -52,9 +52,10 @@
file.AddLine(" \"\"\"Terminate processing of this flow chart, by closing this particular connection. ");
file.AddLine(" \"\"\" ");
file.AddLine(" if self.isMaster: ");
- file.AddLine(" reactor.disconnectAll() ");
+ file.AddLine(" reactor.stop() ");
file.AddLine(" else: ");
file.AddLine(" self.transport.loseConnection() ");
+ file.AddLine(" self.keepGoing = False ");
file.AddLine(" return None ");
file.AddLine(" ");
Modified: sofaswitch/trunk/callflow/src/requestnode.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/requestnode.cpp (original)
+++ sofaswitch/trunk/callflow/src/requestnode.cpp Mon Nov 6 22:09:32 2006
@@ -27,7 +27,7 @@
SetSize(newSize);
displayData[displayData.size()] =
- InformationSection(wxT("Request node from (Python code)"), wxT("voip"));
+ InformationSection(wxT("Request node from (Python code)"), wxT("\"voip\""));
displayData[displayData.size()] =
InformationSection(wxT("Timer period (seconds)"), wxT("1"));
@@ -47,7 +47,8 @@
{
DrawCompileError(dc);
dc.SetPen(*wxBLACK_PEN);
-
+ dc.SetBrush(wxBrush(*wxBLACK, wxSOLID));
+
wxPoint p1(m_rect.GetPosition());
wxPoint pA(p1.x + 25, p1.y + 0);
wxPoint pB(p1.x + 25, p1.y + 50);
@@ -79,9 +80,12 @@
file.AddLine(" eName = self.data[a][\"Timer label\"] ");
file.AddLine(" self.pendingEvents[eName] = a ");
file.AddLine(" reactor.callLater(self.data[a][\"Timer period\"], self.timerObjectExpired, eName)");
- file.AddLine(" rhost = self.data[a][\"Request node from (Python code)\"] ");
- file.AddLine(" rhost += \":REQUESTNEWID \" ");
- file.AddLine(" rhost += eval(self.data[a][\"Additional info (Python code)\"]) + \"\\0\" ");
+ file.AddLine(" rhost = self.data[a][\"Request node from\"] ");
+ file.AddLine(" rhost = eval(rhost) + \":REQUESTNEWID \" ");
+ file.AddLine(" additional = self.data[a][\"Additional info\"] ");
+ file.AddLine(" if len(additional) > 0: ");
+ file.AddLine(" rhost += eval(additional) ");
+ file.AddLine(" rhost += \"\\0\" ");
file.AddLine(" self.transport.write(rhost) ");
file.AddLine(" return self.data[a][\"Output\"] ");
file.AddLine("");
Modified: sofaswitch/trunk/callflow/src/shapelist.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/shapelist.cpp (original)
+++ sofaswitch/trunk/callflow/src/shapelist.cpp Mon Nov 6 22:09:32 2006
@@ -494,15 +494,22 @@
file.AddLine(" queue. On doing this, spark an event to drive queue processing. ");
file.AddLine(" Note that this method can only deal with certain predefined ");
file.AddLine(" types of messages ");
- file.AddLine(" \"\"\" ");
- file.AddLine(" thisMessage = thisMessage.strip() ");
- file.AddLine(" for msg in self.knownNetworkMessages: ");
- file.AddLine(" if thisMessage.find(msg) >= 0: ");
- file.AddLine(" pMsg = str(thisMessage).split(\" \") ");
- file.AddLine(" eName = pMsg[0].replace(\":\",\"\") ");
- file.AddLine(" self.networkEventData(eName, pMsg[1]) ");
- file.AddLine(" ");
- file.AddLine(" ");
+ file.AddLine(" \"\"\" ");
+ file.AddLine(" thisMessage = thisMessage.strip() ");
+ file.AddLine(" for msg in self.knownNetworkMessages: ");
+ file.AddLine(" if thisMessage.find(msg) >= 0: ");
+ file.AddLine(" idx = thisMessage.find(\":\") ");
+ file.AddLine(" msga = thisMessage[0:idx] + thisMessage[(idx+1):] ");
+ file.AddLine(" idx = thisMessage.find(\" \") ");
+ file.AddLine(" if idx < 0: ");
+ file.AddLine(" eName= msga ");
+ file.AddLine(" body=\"\" ");
+ file.AddLine(" else: ");
+ file.AddLine(" eName = msga[0:idx] ");
+ file.AddLine(" body = thisMessage[(idx+1):] ");
+ file.AddLine(" self.networkEventData(eName, body) ");
+ file.AddLine(" ");
+ file.AddLine(" ");
for (int i = 0; i < DndShape::KnownShapes; i++) {
DndShape *thisShape;
if (i == DndShape::None)
1
0
Author: derek
Date: Mon Nov 6 20:10:49 2006
New Revision: 159
Modified:
sofaswitch/trunk/mcu/member.cxx
sofaswitch/trunk/mcu/participant.cxx
sofaswitch/trunk/mcu/participant.h
Log:
Get the closedown of members and participants to work correctly.
Add PTRACE statements.
Modified: sofaswitch/trunk/mcu/member.cxx
==============================================================================
--- sofaswitch/trunk/mcu/member.cxx (original)
+++ sofaswitch/trunk/mcu/member.cxx Mon Nov 6 20:10:49 2006
@@ -302,10 +302,13 @@
}
}
+ PTRACE(3, "Member\tClear now empty partydict");
participants.EmptyParticipantDict();
+
+ PTRACE(3, "Member\tClear now wait for empty partydict");
participants.WaitForTotallyEmpty();
-
+ PTRACE(3, "Member\tClear now do OnReleaed.");
OnReleased();
PTRACE(3, "Member\tOnRelease thread completed for " << *this);
Modified: sofaswitch/trunk/mcu/participant.cxx
==============================================================================
--- sofaswitch/trunk/mcu/participant.cxx (original)
+++ sofaswitch/trunk/mcu/participant.cxx Mon Nov 6 20:10:49 2006
@@ -182,6 +182,7 @@
{
int loops = 0;
while (countEntries > 0) {
+ PTRACE(3, "ParticipantDict:: WaitForTotallyEmpty with a count of " << countEntries);
loops++;
PThread::Sleep(300);
if ((loops % 6) == 0)
Modified: sofaswitch/trunk/mcu/participant.h
==============================================================================
--- sofaswitch/trunk/mcu/participant.h (original)
+++ sofaswitch/trunk/mcu/participant.h Mon Nov 6 20:10:49 2006
@@ -120,7 +120,7 @@
/**A particpant calls this method when the participant is
deleted. This method is used to keep track of the number of
participant instances in this dictionary. */
- void ParticipantDestroyed() { ++countEntries; }
+ void ParticipantDestroyed() { --countEntries; }
/**A participant has gone through it's clear process, and now needs to
advise this dictionary that it has been released */
1
0
Author: derek
Date: Sun Nov 5 23:17:15 2006
New Revision: 158
Modified:
sofaswitch/trunk/mcu/participant.h
Log:
Add comment to one method.
Modified: sofaswitch/trunk/mcu/participant.h
==============================================================================
--- sofaswitch/trunk/mcu/participant.h (original)
+++ sofaswitch/trunk/mcu/participant.h Sun Nov 5 23:17:15 2006
@@ -258,6 +258,11 @@
Remember, this participant instance is from srcMemberId(this) to
dstMemberId;
+
+ This is a one line method, that was not easy to move into this method.
+ -that would have meanth including member.h into this file, and having a
+ weird double reverse include process. Further, we can now nicely put
+ comment generating code into the body of this method.
*/
void DestroyReverseLink();
1
0
Author: derek
Date: Sun Nov 5 23:10:14 2006
New Revision: 157
Modified:
sofaswitch/trunk/mcu/manager.cxx
sofaswitch/trunk/mcu/participant.cxx
sofaswitch/trunk/mcu/participant.h
Log:
Fix a build issue. Add a comment to the source code.
Modified: sofaswitch/trunk/mcu/manager.cxx
==============================================================================
--- sofaswitch/trunk/mcu/manager.cxx (original)
+++ sofaswitch/trunk/mcu/manager.cxx Sun Nov 5 23:10:14 2006
@@ -224,7 +224,10 @@
Comms *c = runningComms->GetNextComms();
if (c == NULL)
return;
- c->SetRemoteController(requester);
+
+ /* The next line of code ensures there will be a message, generated by the server,
+ sent to the node specified in requester when c dies. */
+ c->SetRemoteController(requester);
PTRACE(3, "Prior Create Member, size is " << activeMembers.GetSize());
PSafePtr <Member> member = new Member(*this, roomId, c->GetOurId());
Modified: sofaswitch/trunk/mcu/participant.cxx
==============================================================================
--- sofaswitch/trunk/mcu/participant.cxx (original)
+++ sofaswitch/trunk/mcu/participant.cxx Sun Nov 5 23:10:14 2006
@@ -89,6 +89,12 @@
dictionary.ParticipantReleased(GetKey());
}
+
+void Participant::DestroyReverseLink()
+{
+ dstMemberPtr->DestroyThisParticipant(matchingKey);
+}
+
void Participant::Clear()
{
Modified: sofaswitch/trunk/mcu/participant.h
==============================================================================
--- sofaswitch/trunk/mcu/participant.h (original)
+++ sofaswitch/trunk/mcu/participant.h Sun Nov 5 23:10:14 2006
@@ -259,8 +259,7 @@
Remember, this participant instance is from srcMemberId(this) to
dstMemberId;
*/
- void DestroyReverseLink() { dstMemberPtr->DestroyThisParticipant(matchingKey); }
-
+ void DestroyReverseLink();
/**link to the manager, who knows everything about everything */
Manager & manager;
1
0
Author: derek
Date: Sun Nov 5 22:12:57 2006
New Revision: 156
Modified:
sofaswitch/trunk/mcu/participant.cxx
sofaswitch/trunk/mcu/participant.h
Log:
tidy up the handling of one method, and make the name/comment more meaningful
Modified: sofaswitch/trunk/mcu/participant.cxx
==============================================================================
--- sofaswitch/trunk/mcu/participant.cxx (original)
+++ sofaswitch/trunk/mcu/participant.cxx Sun Nov 5 22:12:57 2006
@@ -114,18 +114,13 @@
{
PTRACE(3, "OnRelease thread started for " << *this);
- DestroyNeighboursLink();
+ DestroyReverseLink();
OnReleased();
PTRACE(3, "Participant OnRelease thread completed for " << *this);
// Dereference on the way out of the thread
SafeDereference();
-}
-
-void Participant::DestroyNeighboursLink()
-{
- dstMemberPtr->DestroyThisParticipant(matchingKey);
}
Modified: sofaswitch/trunk/mcu/participant.h
==============================================================================
--- sofaswitch/trunk/mcu/participant.h (original)
+++ sofaswitch/trunk/mcu/participant.h Sun Nov 5 22:12:57 2006
@@ -253,9 +253,13 @@
*/
virtual void OnReleased();
- /**Destroy the link from us to the other. This causees the other to
- quietly destroy its link to us, but not tell us it has died */
- void DestroyNeighboursLink();
+ /**Destroy the reverse link. That is, the link from dstMemberId to
+ srcMemberId(this).
+
+ Remember, this participant instance is from srcMemberId(this) to
+ dstMemberId;
+ */
+ void DestroyReverseLink() { dstMemberPtr->DestroyThisParticipant(matchingKey); }
/**link to the manager, who knows everything about everything */
1
0
Author: derek
Date: Sun Nov 5 21:08:36 2006
New Revision: 155
Modified:
sofaswitch/trunk/mcu/audio.cxx
sofaswitch/trunk/mcu/comms.cxx
sofaswitch/trunk/mcu/manager.cxx
sofaswitch/trunk/mcu/manager.h
sofaswitch/trunk/mcu/member.cxx
sofaswitch/trunk/mcu/member.h
sofaswitch/trunk/mcu/participant.cxx
sofaswitch/trunk/mcu/participant.h
Log:
Big tidyup.
Remove the use of PSafePtr structures in a class decleration.
Use SafeReference and SafeDereference to keep the pointers good.
Move activeMembers and activeRooms to be public components of the manager.
Modified: sofaswitch/trunk/mcu/audio.cxx
==============================================================================
--- sofaswitch/trunk/mcu/audio.cxx (original)
+++ sofaswitch/trunk/mcu/audio.cxx Sun Nov 5 21:08:36 2006
@@ -61,8 +61,8 @@
PString name = "Reader " + memberId;
PThread::Current()->SetThreadName(name);
- PSafePtr <Member> member = manager->GetMember(memberId);
-
+ PSafePtr <Member> member = manager->activeMembers.FindWithLock(memberId, PSafeReadOnly);
+
PINDEX readSize = 480;
PBYTEArray data;
data.SetSize(readSize);
@@ -111,7 +111,7 @@
PString name = "Writer " + memberId;
PThread::Current()->SetThreadName(name);
- PSafePtr <Member> member = manager->GetMember(memberId);
+ PSafePtr <Member> member = manager->activeMembers.FindWithLock(memberId, PSafeReadOnly);
PINDEX maxSize = 480;
PBYTEArray data;
Modified: sofaswitch/trunk/mcu/comms.cxx
==============================================================================
--- sofaswitch/trunk/mcu/comms.cxx (original)
+++ sofaswitch/trunk/mcu/comms.cxx Sun Nov 5 21:08:36 2006
@@ -147,7 +147,7 @@
void Comms::ProcessStatusQuery(PStringArray &cmds, PString & sender)
{
PTRACE(3, "Coms::ProcessStatusQuery");
- PSafePtr <Member> member = manager.GetMember(GetOurId());
+ PSafePtr <Member> member = manager.activeMembers.FindWithLock(GetOurId(), PSafeReadOnly);;
if (member != NULL) {
PString message = PString("In conference room \"") + member->GetRoomId() + "\"";
SendThisMessageTo(message, sender);
@@ -174,7 +174,7 @@
PString Comms::GetConferenceParticipants()
{
- PSafePtr <Member> member = manager.GetMember(GetOurId());
+ PSafePtr <Member> member = manager.activeMembers.FindWithLock(GetOurId(), PSafeReadOnly);
if (member == NULL)
return " No participant information available";
@@ -187,7 +187,7 @@
return "waiting to connect to Sofa Switch entity";
}
- PSafePtr <Member> member = manager.GetMember(GetOurId());
+ PSafePtr <Member> member = manager.activeMembers.FindWithLock(GetOurId(), PSafeReadOnly);
if (member == NULL)
return " No duration information available";
Modified: sofaswitch/trunk/mcu/manager.cxx
==============================================================================
--- sofaswitch/trunk/mcu/manager.cxx (original)
+++ sofaswitch/trunk/mcu/manager.cxx Sun Nov 5 21:08:36 2006
@@ -320,20 +320,6 @@
}
-
-PSafePtr<ConferenceRoom> Manager::GetConferenceRoom(PString roomId)
-{
- PSafePtr<ConferenceRoom> room = activeRooms.FindWithLock(roomId, PSafeReadOnly);
- return room;
-}
-
-PSafePtr<Member> Manager::GetMember(PString memberId)
-{
- PSafePtr <Member> mem= activeMembers.FindWithLock(memberId, PSafeReadOnly);
- return mem;
-}
-
-
void Manager::RemoveAllCalls()
{
PTRACE(3, "Remove All callls from the manager, close running comms down");
Modified: sofaswitch/trunk/mcu/manager.h
==============================================================================
--- sofaswitch/trunk/mcu/manager.h (original)
+++ sofaswitch/trunk/mcu/manager.h Sun Nov 5 21:08:36 2006
@@ -128,12 +128,6 @@
/**Wait until the supervisor has finished */
void WaitForSupervisorEnd();
- /**get a safe ptr to the conference room matching a particular ID */
- PSafePtr<ConferenceRoom> GetConferenceRoom(PString roomId);
-
- /**Get one element from the list of members */
- PSafePtr<Member> GetMember(PString memberId);
-
/**Get the status on all conferences, or just one conference */
PString ProcessStatusQuery(PStringArray & cmds);
@@ -159,7 +153,23 @@
/**Callback for removing a connection from the list of active
connections */
void OnReleased(const PString & memberId);
+
+ /**List of available members in the system, which is all calls +
+ file members */
+ MemberDict activeMembers;
+
+ /**The thread safe list of conference rooms that we manage */
+ class ConferenceRoomDict : public PSafeDictionary<PString, ConferenceRoom>
+ {
+ /**One function that we have to define for this usage, and that
+ is the deletion of existing methods. PWLib will have removed
+ the object to be deleted from the list. We simply need to
+ delete it. */
+ virtual void DeleteObject(PObject * object) const;
+ } activeRooms;
+
+
protected:
/**Go through the list of active calls, and tell them to "die now" */
@@ -198,21 +208,6 @@
/**Sync point that can be called to end the whole thing */
PSyncPoint syncPoint;
-
-
- /**The thread safe list of conference rooms that we manage */
- class ConferenceRoomDict : public PSafeDictionary<PString, ConferenceRoom>
- {
- /**One function that we have to define for this usage, and that
- is the deletion of existing methods. PWLib will have removed
- the object to be deleted from the list. We simply need to
- delete it. */
- virtual void DeleteObject(PObject * object) const;
- } activeRooms;
-
- /**List of available members in the system, which is all calls +
- file members */
- MemberDict activeMembers;
/**The list of initialised, ready to go, Comms instances */
CommsProvider *runningComms;
Modified: sofaswitch/trunk/mcu/member.cxx
==============================================================================
--- sofaswitch/trunk/mcu/member.cxx (original)
+++ sofaswitch/trunk/mcu/member.cxx Sun Nov 5 21:08:36 2006
@@ -99,8 +99,10 @@
buffer = NULL;
}
}
+
DecCountMembers();
}
+
void Member::PrintOn(ostream & strm /// Stream to output text representation
) const
@@ -148,7 +150,7 @@
PTRACE(3, "START Tell conference room \"" << roomId
<< "\" to remove me (" << memberId << ")");
{
- PSafePtr <ConferenceRoom> conferenceRoom = manager.GetConferenceRoom(roomId);
+ PSafePtr <ConferenceRoom> conferenceRoom = manager.activeRooms.FindWithLock(roomId, PSafeReadOnly);
if (conferenceRoom != NULL) {
conferenceRoom->RemoveMember(memberId);
} else {
@@ -291,7 +293,7 @@
PTRACE(3, "OnRelease thread started for " << *this);
{
- PSafePtr <ConferenceRoom> conferenceRoom = manager.GetConferenceRoom(roomId);
+ PSafePtr <ConferenceRoom> conferenceRoom = manager.activeRooms.FindWithLock(roomId, PSafeReadOnly);
if (conferenceRoom != NULL) {
conferenceRoom->RemoveMember(memberId);
} else {
@@ -378,19 +380,19 @@
SetThreadName(PString("FillMemberList ") + targetMemberId);
PTRACE(3, "Append Start " << *this);
- PSafePtr <Member> targetMember = manager.GetMember(targetMemberId);
+ PSafePtr <Member> targetMember = manager.activeMembers.FindWithLock(targetMemberId, PSafeReadOnly);
if (targetMember == NULL)
return;
for(PINDEX i = 0; i < membersToAdd.GetSize(); i++) {
- PSafePtr <Member> otherMember = manager.GetMember(membersToAdd[i]);
- if ((otherMember != NULL) && (otherMember->GetMemberId() != targetMember->GetMemberId())) {
- targetMember->AddMemberToRoom(membersToAdd[i]);
- otherMember->AddMemberToRoom(targetMemberId);
- }
+ PSafePtr <Member> otherMember = manager.activeMembers.FindWithLock(membersToAdd[i] , PSafeReadOnly);
+ if ((otherMember != NULL) && (otherMember->GetMemberId() != targetMember->GetMemberId())) {
+ targetMember->AddMemberToRoom(membersToAdd[i]);
+ otherMember->AddMemberToRoom(targetMemberId);
+ }
}
-
+
PTRACE(3, "Append Done " << *this);
}
Modified: sofaswitch/trunk/mcu/member.h
==============================================================================
--- sofaswitch/trunk/mcu/member.h (original)
+++ sofaswitch/trunk/mcu/member.h Sun Nov 5 21:08:36 2006
@@ -223,6 +223,9 @@
/**Flag to indicate we are being cleared, or have been cleared */
BOOL isClearing;
+
+
+
};
Modified: sofaswitch/trunk/mcu/participant.cxx
==============================================================================
--- sofaswitch/trunk/mcu/participant.cxx (original)
+++ sofaswitch/trunk/mcu/participant.cxx Sun Nov 5 21:08:36 2006
@@ -40,18 +40,23 @@
////////////////////////////////////////////////////////////////////////////////
Participant::Participant(Manager & _mgr, ParticipantDict & _partyDict,
- const PString &baseMemberId,
- PSafePtr <Member> member)
+ const PString &_srcMemberId,
+ const PString &_dstMemberId)
: manager(_mgr),
dictionary(_partyDict),
- srcMemberId(baseMemberId)
+ srcMemberId(_srcMemberId),
+ dstMemberId(_dstMemberId)
{
- dstMemberId = member->GetMemberId();
SetKey (srcMemberId + PString("-->") + dstMemberId);
SetMatchingKey(dstMemberId + PString("-->") + srcMemberId);
isClearing = FALSE;
- memberPtr = member;
+ srcMemberPtr = manager.activeMembers.FindWithLock(srcMemberId, PSafeReadOnly);
+ srcMemberPtr->SafeReference();
+ dstMemberPtr = manager.activeMembers.FindWithLock(dstMemberId, PSafeReadOnly);
+ dstMemberPtr->SafeReference();
+
+
PTRACE(3, "Participant\tConstructor " << *this);
currentReadIndex = 0;
IncCountParticipants();
@@ -63,6 +68,8 @@
DecCountParticipants();
PTRACE(3, "Participant " << *this << " destroyed dead and gone");
+ srcMemberPtr->SafeDereference();
+ dstMemberPtr->SafeDereference();
dictionary.ParticipantDestroyed();
}
@@ -72,14 +79,9 @@
strm << "(" << GetKey() << ")";
}
-PString Participant::GetMemberId()
-{
- return srcMemberId;
-}
-
BOOL Participant::ReadAndMixAudio(BYTE * data, PINDEX amount)
{
- return memberPtr->ReadAndMixAudio(data, amount, currentReadIndex);
+ return dstMemberPtr->ReadAndMixAudio(data, amount, currentReadIndex);
}
void Participant::OnReleased()
@@ -90,13 +92,14 @@
void Participant::Clear()
{
- PTRACE(3, *this << " has been told to CLEAR");
{
PWaitAndSignal m(clearMutex);
if (isClearing)
return;
isClearing = TRUE;
}
+ PTRACE(3, *this << " commence CLEAR now");
+
// Add a reference for the thread we are about to start
SafeReference();
PString clearName = PString("OnRelease ") + GetKey();
@@ -122,7 +125,7 @@
void Participant::DestroyNeighboursLink()
{
- new MatchingParticipantConsumer(manager, dstMemberId, GetMatchingKey());
+ dstMemberPtr->DestroyThisParticipant(matchingKey);
}
@@ -176,8 +179,12 @@
void ParticipantDict::WaitForTotallyEmpty()
{
+ int loops = 0;
while (countEntries > 0) {
- PThread::Sleep(500);
+ loops++;
+ PThread::Sleep(300);
+ if ((loops % 6) == 0)
+ EmptyParticipantDict(TRUE);
}
}
@@ -193,7 +200,7 @@
PSortedStringList res;
for (PSafePtr<Participant> participant(*this, PSafeReadOnly);
participant != NULL; ++participant)
- res.AppendString(participant->GetMemberId());
+ res.AppendString(participant->GetDstMemberId());
return res;
}
@@ -217,20 +224,20 @@
return;
}
- PSafePtr <Member> dstMemberPtr = mgr.GetMember(dstMember);
+ PSafePtr <Member> dstMemberPtr = mgr.activeMembers.FindWithLock(dstMember, PSafeReadOnly);
if (dstMemberPtr != NULL) {
- PSafePtr <Participant> participant = new Participant(mgr, *this, srcMember, dstMemberPtr);
+ PSafePtr <Participant> participant = new Participant(mgr, *this, srcMember, dstMember);
SetAt(participant->GetKey(), participant);
PTRACE(3, "Done add new participant of " << participant->GetKey());
}
}
-void ParticipantDict::EmptyParticipantDict()
+void ParticipantDict::EmptyParticipantDict(BOOL doForce)
{
{
PWaitAndSignal m(addNewParticipantMutex);
- if (shuttingDown)
+ if (shuttingDown && (!doForce))
return;
shuttingDown = TRUE;
}
@@ -261,34 +268,3 @@
RemoveAt(partKey);
}
}
-
-/////////////////////////////////////////////////////////////////////////////
-
-
-MatchingParticipantConsumer::MatchingParticipantConsumer(Manager & _mgr,
- const PString & _otherMember,
- const PString & _partyKey)
- :PThread(10000, AutoDeleteThread, LowPriority, "%X participantdelete"),
- mgr(_mgr),
- otherMember(_otherMember),
- partyKey(_partyKey)
-{
- PTRACE(3, "ParticipantConsumer contructor " << partyKey);
- Resume();
-}
-
-MatchingParticipantConsumer::~MatchingParticipantConsumer()
-{
- PTRACE(3, "ParticipantConsumer destructor " << partyKey);
-}
-
-void MatchingParticipantConsumer::Main()
-{
- PSafePtr <Member> member = mgr.GetMember(otherMember);
-
- if (member == NULL)
- return;
-
- member->DestroyThisParticipant(partyKey);
-}
-
Modified: sofaswitch/trunk/mcu/participant.h
==============================================================================
--- sofaswitch/trunk/mcu/participant.h (original)
+++ sofaswitch/trunk/mcu/participant.h Sun Nov 5 21:08:36 2006
@@ -102,9 +102,12 @@
Note, if there is one member in a conference, and only one Member,
there will be no participants in this dictionary. The reason is that
a Participant links from one Member to another Member.
+
+ The argument, doForce is turned on only for desperate times, when the
+ dictionary does not appear to be shutting down on its own accord.
*/
- void EmptyParticipantDict();
+ void EmptyParticipantDict(BOOL doForce = FALSE);
/**Wait for this class to go totally empty, with zero entries in it. */
void WaitForTotallyEmpty();
@@ -150,6 +153,8 @@
PDECLARE_NOTIFIER(PThread, ParticipantDict, GarbageMain);
#endif
+
+
private:
/**Count of the additions/deleteions to this class */
PAtomicInteger countEntries;
@@ -186,8 +191,8 @@
and knows the conference we are a part of */
Participant(Manager & _mgr,
ParticipantDict & partDict,
- const PString &baseMember,
- PSafePtr <Member> member);
+ const PString &_srcMemberId,
+ const PString &_dstMemberId);
/** Destructor */
~Participant();
@@ -208,9 +213,12 @@
and active */
BOOL ReadAndMixAudio(BYTE * ptr, PINDEX amount);
- /**Get the id used by the Member class that this Participant looks after */
- PString GetMemberId();
+ /**Get the id used by the Member class that this Participant is held by */
+ PString GetSrcMemberId() { return srcMemberId; }
+ /**Get the id used by the Member class that this Participant points to. */
+ PString GetDstMemberId() { return dstMemberId; }
+
/**Report the key which this participant is known by. The key
describes the id of the member who created us, and the member we
are connected to. */
@@ -269,9 +277,13 @@
/** Current read position in the buffer.*/
PINDEX currentReadIndex;
- /**The remote member that we are connected to */
- PSafePtr <Member> memberPtr;
+ /**The local member, who looks after us */
+ Member * srcMemberPtr;
+ /**The remote member, who is also in this conference. This Participant
+ instance is responsible for sending data to this one remote member */
+ Member * dstMemberPtr;
+
/**The id of the Member who will use us to link to memberId */
PString srcMemberId;
@@ -299,40 +311,6 @@
BOOL isClearing;
};
-/////////////////////////////////////////////////////////////////////////////
-/**Delete one participant, whoc matches a previous participant that
- died. . Do this in a separate thread so it is really fast to
- delete lots of participants, and not hold up the household
- delettion prcoess cause one was slow to delete.. Thus, this program
- will scale nicely when placed on a multi cpu machine */
-
-class MatchingParticipantConsumer: public PThread
-{
- PCLASSINFO(MatchingParticipantConsumer, PThread);
-
- /**Constructor - create this class, which is given the class to destroy.
- This class then does the rest */
- MatchingParticipantConsumer(Manager & _mgr,
- const PString &_otherMember,
- const PString & _partyKey);
-
- /**Destructor. */
- ~MatchingParticipantConsumer();
-
- /**Where this thread runs to do the work */
- void Main();
-
- protected:
- /**Reference to the manager of this conference */
- Manager & mgr;
-
- /**The instance we have to talk to, so the matching Participant
- class can be deleted */
- PString otherMember;
-
- /**The key of the matching Participant class we want to delete */
- PString partyKey;
-};
#endif // _Mcu_Participant_H
1
0
Author: derek
Date: Sun Oct 29 20:58:23 2006
New Revision: 154
Modified:
sofaswitch/trunk/callflow/src/requestnode.cpp
Log:
Remove empty quotes from additional information field.
Modified: sofaswitch/trunk/callflow/src/requestnode.cpp
==============================================================================
--- sofaswitch/trunk/callflow/src/requestnode.cpp (original)
+++ sofaswitch/trunk/callflow/src/requestnode.cpp Sun Oct 29 20:58:23 2006
@@ -36,7 +36,7 @@
InformationSection(wxT("Timer label"), wxT("request node"));
displayData[displayData.size()] =
- InformationSection(wxT("Additional information (Python code)"), wxT("\"\""));
+ InformationSection(wxT("Additional information (Python code)"), wxT(""));
relInputPoints.Add(25, 0);
relOutputPoints.Add(25, 50);
1
0
Author: derek
Date: Sat Oct 28 03:42:51 2006
New Revision: 153
Modified:
sofaswitch/trunk/callflow/src/dnd.h
Log:
Reformat the list of kinds to a better syle of commenting for doxygen and
readability.
Modified: sofaswitch/trunk/callflow/src/dnd.h
==============================================================================
--- sofaswitch/trunk/callflow/src/dnd.h (original)
+++ sofaswitch/trunk/callflow/src/dnd.h Sat Oct 28 03:42:51 2006
@@ -250,28 +250,28 @@
/**The currently defined shapes that we can draw */
enum Kind
{
- /* 0 */ None /**The default kind, which is a placeholder, and is no shape at all */,
- /* 1 */ StartHere, /**Start processing here */
- /* 2 */ EndHere, /**Finish processing here */
- /* 3 */ StartFor /**Start of a for loop */,
- /* 4 */ EndFor /**End of a for loop */,
- /* 5 */ Conditional /**An If statement. This is the beginning - the end is handled by joining wires. */,
- /* 6 */ MakeCall /**Get a call started. In other words, start calling some entity outside of the building*/,
- /* 7 */ EndCall /**End a call. In other words, send a hangup message to the node */,
- /* 8 */ Select /**Used to indicate the rectangle on the screen we are selecting */,
- /* 9 */ JoinBlocks /**The multi line segment shape which joins two structures on the screen */,
- /* 10*/ Python /**The user can enter arbitary python here */,
- /* 11*/ RequestNode /**Query a supervisor for a node to use to talk on*/,
- /**12*/ Timer /**Initiate a timer, which runs for some specified time interval */,
- /**13*/ StopTimer /**Stop a running timer, so it will not generate an event etc */,
- /**14*/ Eventer /**Mark me as registering for an event. Possibly, wait for the registered for event */,
- /**15*/ TransferMedia /**Transfer media from one sofaswitch entity to another */,
- /**16*/ ReadFromFile /**Read audio from a .wav file (answering machine specific) */,
- /**17*/ WriteToFile /**Write audio into a .wav file (answering machine specific) */,
- /**18*/ LoadNewGraph /**Read in an existing graph file (pre compiled) for a new thread of exeuction */,
- /**19*/ SendDtmf /**Send a dtmf symbol to some sofaswitch worker node */,
- /**20*/ Death /**End all processing of this call flow now */,
- /* 21*/ KnownShapes /**Indicates the number of known shapes we can manage */
+ None = 0, /*!< The default kind, which is a placeholder, and is no shape at all */
+ StartHere = 1, /*!< Start processing here */
+ EndHere = 2, /*!< Finish processing here */
+ StartFor = 3, /*!< Start of a for loop */
+ EndFor = 4, /*!< End of a for loop */
+ Conditional = 5, /*!< An If statement. This is the beginning - the end is handled by joining wires. */
+ MakeCall = 6, /*!< Get a call started. In other words, start calling some entity outside of the building*/
+ EndCall = 7, /*!< End a call. In other words, send a hangup message to the node */
+ Select = 8, /*!< Used to indicate the rectangle on the screen we are selecting */
+ JoinBlocks = 9, /*!< The multi line segment shape which joins two structures on the screen */
+ Python = 10, /*!< The user can enter arbitary python here */
+ RequestNode = 11, /*!< Query a supervisor for a node to use to talk on*/
+ Timer = 12, /*!< Initiate a timer, which runs for some specified time interval */
+ StopTimer = 13, /*!< Stop a running timer, so it will not generate an event etc */
+ Eventer = 14, /*!< Mark me as registering for an event. Possibly, wait for the registered for event */
+ TransferMedia= 15, /*!< Transfer media from one sofaswitch entity to another */
+ ReadFromFile = 16, /*!< Read audio from a .wav file (answering machine specific) */
+ WriteToFile = 17, /*!< Write audio into a .wav file (answering machine specific) */
+ LoadNewGraph = 18, /*!< Read in an existing graph file (pre compiled) for a new thread of exeuction */
+ SendDtmf = 19, /*!< Send a dtmf symbol to some sofaswitch worker node */
+ Death = 20, /*!< End all processing of this call flow now */
+ KnownShapes = 21 /*!< Indicates the number of known shapes we can manage */
};
/**Constructor to a predefined shape */
1
0