opc_ua/client.py
branchwxPython4
changeset 3652 b5c6bb72bfc9
parent 3643 c6068b674b30
child 3674 d10a7907fb43
equal deleted inserted replaced
3643:c6068b674b30 3652:b5c6bb72bfc9
    65                           </xsd:complexType>
    65                           </xsd:complexType>
    66                         </xsd:element>
    66                         </xsd:element>
    67                       </xsd:sequence>
    67                       </xsd:sequence>
    68                       <xsd:attribute name="Certificate" type="xsd:string" use="optional" default="certificate.pem"/>
    68                       <xsd:attribute name="Certificate" type="xsd:string" use="optional" default="certificate.pem"/>
    69                       <xsd:attribute name="PrivateKey" type="xsd:string" use="optional" default="private_key.pem"/>
    69                       <xsd:attribute name="PrivateKey" type="xsd:string" use="optional" default="private_key.pem"/>
    70                       <xsd:attribute name="ApplicationUri" type="xsd:string" use="optional"/>
       
    71                     </xsd:complexType>
    70                     </xsd:complexType>
    72                   </xsd:element>
    71                   </xsd:element>
    73                   <xsd:element name="UserPassword">
    72                   <xsd:element name="UserPassword">
    74                     <xsd:complexType>
    73                     <xsd:complexType>
    75                       <xsd:attribute name="User" type="xsd:string" use="optional"/>
    74                       <xsd:attribute name="User" type="xsd:string" use="optional"/>
   113                 if value == "" or value is None:
   112                 if value == "" or value is None:
   114                     value = default
   113                     value = default
   115                 # cryptomaterial is expected to be in project's user provide file directory
   114                 # cryptomaterial is expected to be in project's user provide file directory
   116                 if name in ["Certificate","PrivateKey"]:
   115                 if name in ["Certificate","PrivateKey"]:
   117                     value = os.path.join(self.GetCTRoot()._getProjectFilesPath(), value)
   116                     value = os.path.join(self.GetCTRoot()._getProjectFilesPath(), value)
   118                 # ApplicationUri defaults to URI if not set
       
   119                 if name == "ApplicationUri" and not value:
       
   120                         value = res["URI"]
       
   121                 res[name] = value
   117                 res[name] = value
   122 
   118 
   123         return res
   119         return res
   124 
   120 
   125     def GetFileName(self):
   121     def GetFileName(self):