

Public Member Functions | |
| FilePrinter (SamplingSystemGUI ssg) | |
| ArrayList< DataItem > | getSamples () |
| String | getFilename () |
| void | startSample () throws CouldntAccessComponentEx, TypeNotSupportedEx,CouldntAccessPropertyEx, SamplingManagerException |
| void | postProcessing () |
| void | setComponent (String component) |
| void | setProperty (String property) |
| void | setComponentAvailable (boolean available, String reason) |
Protected Member Functions | |
| void | updateValue (DataItem item) |
Private Member Functions | |
| boolean | openFile () |
Private Attributes | |
| long | samplesCounter |
| String | filename = "" |
| FileWriter | file |
| BufferedWriter | writer |
| IsoDateFormat | formater |
| boolean | stopped |
Printer class that acts takes the data that comming from the sampling manager, and do something with it.
In this case, the FilePrinter class dumps the data to a file.
| cl::utfsm::samplingSystemUI::FilePrinter::FilePrinter | ( | SamplingSystemGUI | ssg | ) | [inline] |
Constructor, initialize the sampling counter and creates a BeanMemoryWidget for representation.
| ssg | Sampling System Gui reference. |
References formater, samplesCounter, stopped, and cl::utfsm::samplingSystemUI::DataPrinter::widget.
| String cl::utfsm::samplingSystemUI::FilePrinter::getFilename | ( | ) | [inline] |
Return the name of the file where the data is being dumped to, or the last file used.
References filename.
| ArrayList<DataItem> cl::utfsm::samplingSystemUI::FilePrinter::getSamples | ( | ) | [inline, virtual] |
Since the samples are not stored in memory, nothing can be returned.
Implements cl::utfsm::samplingSystemUI::DataPrinter.
| boolean cl::utfsm::samplingSystemUI::FilePrinter::openFile | ( | ) | [inline, private] |
References cl::utfsm::samplingSystemUI::DataPrinter::component, file, filename, cl::utfsm::samplingSystemUI::DataPrinter::getFrecuency(), and writer.
Referenced by updateValue().
| void cl::utfsm::samplingSystemUI::FilePrinter::postProcessing | ( | ) | [inline, virtual] |
This method should be called after stopping the sampling.
Implements cl::utfsm::samplingSystemUI::DataPrinter.
References cl::utfsm::samplingSystemUI::IGraphicalUpdater::resetSampleCount(), samplesCounter, stopped, cl::utfsm::samplingSystemUI::DataPrinter::widget, and writer.
| void cl::utfsm::samplingSystemUI::FilePrinter::setComponent | ( | String | component | ) | [inline] |
| void cl::utfsm::samplingSystemUI::FilePrinter::setComponentAvailable | ( | boolean | available, | |
| String | reason | |||
| ) | [inline] |
Allows to handle whether a component is or isn't available to be sampled.
| available | True if the component is currently available. | |
| reason | A explanation of the cause why the component isn't available. |
Reimplemented from cl::utfsm::samplingSystemUI::DataPrinter.
References cl::utfsm::samplingSystemUI::IGraphicalUpdater::setComponentAvailable(), and cl::utfsm::samplingSystemUI::DataPrinter::widget.
| void cl::utfsm::samplingSystemUI::FilePrinter::setProperty | ( | String | property | ) | [inline] |
| void cl::utfsm::samplingSystemUI::FilePrinter::startSample | ( | ) | throws CouldntAccessComponentEx, TypeNotSupportedEx,CouldntAccessPropertyEx, SamplingManagerException [inline] |
Starts the sampling, connecting to ACS Manager and the Sampling Manager.
| CouldntAccessComponentEx | Component wasn't available at the time. | |
| TypeNotSupportedEx | Sampling Manager specific exception. Some types are currently not supported in acssamp. |
Reimplemented from cl::utfsm::samplingSystemUI::DataPrinter.
References stopped.
| void cl::utfsm::samplingSystemUI::FilePrinter::updateValue | ( | DataItem | item | ) | [inline, protected, virtual] |
Implements cl::utfsm::samplingSystemUI::DataPrinter.
References cl::utfsm::samplingSystemUI::DataPrinter::component, formater, cl::utfsm::samplingSystemUI::core::DataItem::getTime(), cl::utfsm::samplingSystemUI::core::DataItem::getValue(), openFile(), cl::utfsm::samplingSystemUI::DataPrinter::property, samplesCounter, stopped, cl::utfsm::samplingSystemUI::IGraphicalUpdater::updateValues(), cl::utfsm::samplingSystemUI::DataPrinter::widget, and writer.
FileWriter cl::utfsm::samplingSystemUI::FilePrinter::file [private] |
Referenced by openFile().
String cl::utfsm::samplingSystemUI::FilePrinter::filename = "" [private] |
Referenced by getFilename(), and openFile().
Referenced by FilePrinter(), and updateValue().
long cl::utfsm::samplingSystemUI::FilePrinter::samplesCounter [private] |
Referenced by FilePrinter(), postProcessing(), and updateValue().
boolean cl::utfsm::samplingSystemUI::FilePrinter::stopped [private] |
Referenced by FilePrinter(), postProcessing(), startSample(), and updateValue().
BufferedWriter cl::utfsm::samplingSystemUI::FilePrinter::writer [private] |
Referenced by openFile(), postProcessing(), and updateValue().
1.6.2