IToolS Blog

IToolS & XmlSerializer

by itools@albertoschiassi.it on venerdì 2 gennaio 2015 08:03

Un esempio di applicazione che mostra come utilizzare il namespace "IToolS.Lite" per salvare la configurazione di applicazione attraverso XmlSerializer:

xml version="1.0" encoding="utf-8"?>
<Application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Modem>
    <SerialConfig>
      <PortName>COM11PortName>
      <BaudRate>19200BaudRate>
      <DataBits>8DataBits>
      <StopBits>OnePointFiveStopBits>
      <Parity>MarkParity>
    SerialConfig>
    <SmsServiceCenterAddress>+393666856867SmsServiceCenterAddress>
    <NeedPin>falseNeedPin>
    <PinCode>1234PinCode>
    <Phone>+393666856867Phone>Iprel SmartPC & IToolS for embedded applications]]>Modem>
  <Trigger>
    <VariableName>TriggerVariableName>
    <Targets>
      <VariableTarget Name="T1" Description="Target 1" Category="NOTIFY" Group="" LowerValue="10" UpperValue="15" />
    Targets>
    <Address>101Address>
    <VariableType>UIntegerVariableType>
    <Scaling>
      <MinValue xsi:type="xsd:int">-32768MinValue>
      <MaxValue xsi:type="xsd:int">32767MaxValue>
    Scaling>
  Trigger>
  <Client>
    <ClientName>Client internalClientName>
    <ClientDescription>Default Client internal.ClientDescription>
    <IOServer>
      <Name>MemoryName>
      <Config />
      <SerialConfig />
      <NetConfig>
        <Address>192.168.0.1Address>
      NetConfig>
    IOServer>
    <Group>
      <Items>
        <Variable>
          <VariableName>Data1VariableName>
          <Targets />
          <Address>10Address>
          <VariableType>RealVariableType>
          <Scaling>
            <MinValue xsi:type="xsd:int">-32768MinValue>
            <MaxValue xsi:type="xsd:int">32767MaxValue>
          Scaling>
        Variable>
      Items>
    Group>
  Client>
  <ActionsWatcher>
    <CycleTime>5000CycleTime>
    <Retries>3Retries>
  ActionsWatcher>
Application>
IToolSNetAlert.zip

Blogs Parent Separator IToolS Blog
Author

Tags