int GetPTZNode()

in sample_app/onvif_camera_mock/artifacts/onvif_srvd/src/ServicePTZ.cpp [137:197]


int GetPTZNode(struct soap *soap, tt__PTZNode* ptzn)
{
    ptzn->token = "PTZNodeToken";
    ptzn->Name  = soap_new_std__string(soap);
    *ptzn->Name = "PTZ";

    ptzn->SupportedPTZSpaces = soap_new_tt__PTZSpaces(soap);;
    soap_default_std__vectorTemplateOfPointerTott__Space2DDescription(soap, &ptzn->SupportedPTZSpaces->tt__PTZSpaces::RelativePanTiltTranslationSpace);
    soap_default_std__vectorTemplateOfPointerTott__Space1DDescription(soap, &ptzn->SupportedPTZSpaces->tt__PTZSpaces::RelativeZoomTranslationSpace);
    soap_default_std__vectorTemplateOfPointerTott__Space2DDescription(soap, &ptzn->SupportedPTZSpaces->tt__PTZSpaces::ContinuousPanTiltVelocitySpace);
    soap_default_std__vectorTemplateOfPointerTott__Space1DDescription(soap, &ptzn->SupportedPTZSpaces->tt__PTZSpaces::ContinuousZoomVelocitySpace);
    soap_default_std__vectorTemplateOfPointerTott__Space1DDescription(soap, &ptzn->SupportedPTZSpaces->tt__PTZSpaces::PanTiltSpeedSpace);
    soap_default_std__vectorTemplateOfPointerTott__Space1DDescription(soap, &ptzn->SupportedPTZSpaces->tt__PTZSpaces::ZoomSpeedSpace);


    auto ptzs1 = soap_new_tt__Space2DDescription(soap);
    ptzn->SupportedPTZSpaces->RelativePanTiltTranslationSpace.push_back(ptzs1);

    auto ptzs2 = soap_new_tt__Space1DDescription(soap);
    ptzn->SupportedPTZSpaces->RelativeZoomTranslationSpace.push_back(ptzs2);

    auto ptzs3 = soap_new_tt__Space2DDescription(soap);
    ptzn->SupportedPTZSpaces->ContinuousPanTiltVelocitySpace.push_back(ptzs3);

    auto ptzs4 = soap_new_tt__Space1DDescription(soap);
    ptzn->SupportedPTZSpaces->ContinuousZoomVelocitySpace.push_back(ptzs4);

    auto ptzs5 = soap_new_tt__Space1DDescription(soap);
    ptzn->SupportedPTZSpaces->PanTiltSpeedSpace.push_back(ptzs5);

    auto ptzs6 = soap_new_tt__Space1DDescription(soap);
    ptzn->SupportedPTZSpaces->ZoomSpeedSpace.push_back(ptzs6);

    ptzs1->URI         = "http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace";
    ptzs1->XRange      = soap_new_req_tt__FloatRange(soap, -1.0f, 1.0f);
    ptzs1->YRange      = soap_new_req_tt__FloatRange(soap, -1.0f, 1.0f);

    ptzs2->URI         = "http://www.onvif.org/ver10/tptz/ZoomSpaces/TranslationGenericSpace";
    ptzs2->XRange      = soap_new_req_tt__FloatRange(soap, -1.0f, 1.0f);

    ptzs3->URI         = "http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace";
    ptzs3->XRange      = soap_new_req_tt__FloatRange(soap, -1.0f, 1.0f);
    ptzs3->YRange      = soap_new_req_tt__FloatRange(soap, -1.0f, 1.0f);

    ptzs4->URI         = "http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace";
    ptzs4->XRange      = soap_new_req_tt__FloatRange(soap, -1.0f, 1.0f);

    ptzs5->URI         = "http://www.onvif.org/ver10/tptz/PanTiltSpaces/GenericSpeedSpace";
    ptzs5->XRange      = soap_new_req_tt__FloatRange(soap, 0.0f, 1.0f);

    ptzs6->URI         = "http://www.onvif.org/ver10/tptz/ZoomSpaces/ZoomGenericSpeedSpace";
    ptzs6->XRange      = soap_new_req_tt__FloatRange(soap, 0.0f, 1.0f);


    ptzn->MaximumNumberOfPresets = 8;
    ptzn->HomeSupported          = true;
    ptzn->FixedHomePosition      = (bool *)soap_malloc(soap, sizeof(bool));
    soap_s2bool(soap, "true", ptzn->FixedHomePosition);

    return SOAP_OK;
}