* Refactored NC_ERRORS

+ Added client configuration api
* Refactored serverconfig
This commit is contained in:
Lucio Maranta
2018-01-11 15:56:33 +01:00
parent 904db3d09c
commit fec3d00ff9
13 changed files with 70 additions and 51 deletions
+2 -1
View File
@@ -31,7 +31,8 @@ namespace Step.Config
.Descendants(NC_CONFIG_KEY)
.Select(x => new NcConfigModel()
{
NcVendor = Convert.ToUInt16(x.Element("ncVendor").Value),
NcVendor = x.Element("ncVendor").Value,
showNcHMI = Convert.ToBoolean(x.Element("showNcHMI").Value),
NcIpAddress = x.Element("ncIpAddress").Value,
NcPort = Convert.ToUInt16(x.Element("ncPort").Value)
}).FirstOrDefault();
+2 -1
View File
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<ncConfig>
<ncVendor>1</ncVendor>
<ncVendor>FANUC</ncVendor> <!-- NO_NC/DEMO/FANUC/SIEMENS/OSAI -->
<showNcHMI>true</showNcHMI>
<ncIpAddress>10.69.36.33</ncIpAddress>
<ncPort>8193</ncPort>
</ncConfig>
+6 -5
View File
@@ -7,6 +7,7 @@
<xs:complexType>
<xs:all>
<xs:element name="ncVendor" type="NcType" minOccurs='1' maxOccurs='1'/>
<xs:element name="showNcHMI" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
<xs:element name="ncIpAddress" minOccurs='1' maxOccurs='1'/>
<xs:element name="ncPort" type="xs:int" minOccurs='1' maxOccurs='1'/>
</xs:all>
@@ -94,11 +95,11 @@
</xs:element>
<xs:simpleType name="NcType" final="restriction" >
<xs:restriction base="xs:integer">
<xs:enumeration value="0" />
<xs:enumeration value="1" />
<xs:enumeration value="2" />
<xs:enumeration value="3" />
<xs:restriction base="xs:string">
<xs:enumeration value="DEMO" />
<xs:enumeration value="OSAI" />
<xs:enumeration value="FANUC" />
<xs:enumeration value="SIEMENS" />
</xs:restriction>
</xs:simpleType>
</xs:schema>