Began implementing the VCommunication namespace.
[aesalon.git] / monitor / src / program / Conductor.cpp
blob74a3406bedd0f5689a08573d290e2605763af8be
1 /**
2 Aesalon, a tool to visualize a program's behaviour at run-time.
3 Copyright (C) 2010, Aesalon Development Team.
5 Aesalon is distributed under the terms of the GNU GPLv3. For more
6 licensing information, see the file LICENSE included with the distribution.
8 @file monitor/src/program/Conductor.cpp
12 #include <iostream>
13 #include <stdio.h>
14 #include <unistd.h>
15 #include <errno.h>
17 #include "program/Conductor.h"
18 #include "Coordinator.h"
19 #include "common/StringTo.h"
20 #include "common/Config.h"
21 #include "common/StreamAsString.h"
22 #include "program/ZoneReader.h"
24 namespace Monitor {
25 namespace Program {
27 Conductor::Conductor(SharedMemory *sharedMemory) : m_sharedMemory(sharedMemory) {
31 Conductor::~Conductor() {
35 void Conductor::run(Module::List *moduleList) {
36 std::list<ZoneReader *> readerList;
37 int readerCount = Common::StringTo<int>(Coordinator::instance()->vault()->get("zoneReaders"));
38 for(int i = 1; i < readerCount; i ++) {
39 ZoneReader *reader = new ZoneReader(m_sharedMemory, moduleList);
40 reader->start();
41 readerList.push_back(reader);
43 ZoneReader reader(m_sharedMemory, moduleList);
44 reader.startInThread();
45 std::cout << "exiting Conductor::run() . . ." << std::endl;
48 } // namespace Program
49 } // namespace Monitor