CaptureNumberOfFrames.cpp
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package VisionX::PointCloud
17 * @author Markus Grotz ( markus dot grotz at kit dot edu )
18 * @date 2016
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
24
25#include "PointCloudStatechartContext.generated.h"
26
28{
29 // DO NOT EDIT NEXT LINE
30 CaptureNumberOfFrames::SubClassRegistry
31 CaptureNumberOfFrames::Registry(CaptureNumberOfFrames::GetName(),
33
34 void
36 {
37 std::string providerName = in.getProviderName();
38 int numberOfFrames = in.getNumberOfFrames();
39 PointCloudStatechartContext* context = getContext<PointCloudStatechartContext>();
40
41 visionx::CapturingPointCloudProviderInterfacePrx providerPrx;
42
43 try
44 {
45 providerPrx =
46 context->getIceManager()
47 ->getProxy<visionx::CapturingPointCloudProviderInterfacePrx>(providerName);
48 }
49 catch (...)
50 {
51 }
52
53 if (providerPrx)
54 {
55 providerPrx->startCaptureForNumFrames(numberOfFrames);
56 emitSuccess();
57 }
58 else
59 {
60 emitFailure();
61 }
62 }
63
64 void
66 {
67 // put your user code for the exit point here
68 // execution time should be short (<100ms)
69 }
70
71 // DO NOT EDIT NEXT FUNCTION
77} // namespace armarx::PointCloud
CaptureNumberOfFrames(const XMLStateConstructorParams &stateData)
static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData)
IceInternal::Handle< XMLStateFactoryBase > XMLStateFactoryBasePtr
Definition XMLState.h:64