gotoPreset static method

XmlDocumentFragment gotoPreset(
  1. String profileToken, {
  2. required String presetToken,
  3. PtzSpeed? speed,
})

XML for the gotoPreset, requires a profileToken, presetToken and optionally PtzSpeed

Implementation

static XmlDocumentFragment gotoPreset(
  String profileToken, {
  required String presetToken,
  PtzSpeed? speed,
}) {
  builder.element('GotoPreset', nest: () {
    builder.namespace(Xmlns.tptz);

    ReferenceToken(profileToken).buildXml(builder);

    ReferenceToken(presetToken).buildXml(
      builder,
      tag: 'PresetToken',
    );

    speed?.buildXml(
      builder,
      tag: 'Speed',
      namespace: Xmlns.tptz,
    );
  });

  return builder.buildFragment();
}