Exemple #1
0
    daveNewConnection(daveInterface di, int MPI, int rack, int slot)
    {
        daveConnection dc;

        dc.pointer = imports.daveNewConnection(di.pointer, MPI, rack, slot);
        return(dc);
    }
Exemple #2
0
 public daveConnection(
     daveInterface di,
     int MPI,
     int rack,
     int slot
     )
 {
     pointer = daveNewConnection(
         di.pointer, MPI, rack, slot
         );
 }
        public daveConnection(
	    daveInterface di,
	    int MPI,
	    int rack,
	    int slot
	)
        {
            pointer=daveNewConnection(
            di.pointer, MPI, rack, slot
            );
        }
Exemple #4
0
    daveNewConnection(
//    int di,
    daveInterface * di,
    int MPI,
    int rack,
    int slot
    );
Exemple #5
0
 daveDisconnectAdapter(daveInterface * di);
Exemple #6
0
    daveListReachablePartners(
	daveInterface* di,
	byte[] buffer
    );
Exemple #7
0
    daveInitAdapter(
        daveInterface * di
//	[MarshalAs(UnmanagedType.LPArray)] daveInterface[] di
    );
Exemple #8
0
 public static daveConnection daveNewConnection(daveInterface di, int MPI, int rack, int slot)
 {
     daveConnection dc;
     dc.pointer=imports.daveNewConnection(di.pointer, MPI, rack, slot);
     return dc;
 }
Exemple #9
0
 public static int daveListReachablePartners(daveInterface di, byte[] buffer)
 {
     return imports.daveListReachablePartners(di.pointer, buffer);
 }
Exemple #10
0
 public static int daveInitAdapter(daveInterface di)
 {
     return imports.daveInitAdapter(di.pointer);
 }
Exemple #11
0
 public static void daveSetTimeout(daveInterface di, int time)
 {
     imports.daveSetTimeout(di.pointer, time);
 }
 public daveConnection(daveInterface di, int MPI, string IP, bool DestinationIsIP, int rack, int slot, bool routing, int routingSubnetFirst, int routingSubnetSecond, int routingRack, int routingSlot, string routingDestination, int PLCConnectionType, int routingPLCConnectionType)
 {
     string[] ip = IP.Split('.');
     byte[] myDestination;
     int myDestinationIsIP = 0;
     if (ip.Length < 4 || !DestinationIsIP)
     {
         myDestination = new byte[] { (byte)Convert.ToInt32(MPI) };
     }
     else
     {
         myDestinationIsIP = 1;
         myDestination = new byte[] { (byte)Convert.ToInt32(ip[0]), (byte)Convert.ToInt32(ip[1]), (byte)Convert.ToInt32(ip[2]), (byte)Convert.ToInt32(ip[3]) };
     }
     routingDestination = routingDestination ?? "";
     ip = routingDestination.Split('.');
     byte[] myRoutingDestination = new byte[4];
     int routingDestinationIsIP = 0;
     if (ip.Length < 4 && !string.IsNullOrEmpty(routingDestination))
     {
         try
         { myRoutingDestination = new byte[] { (byte)Convert.ToInt32(routingDestination) }; }
         catch (Exception)
         { }
     }
     else
     {
         routingDestinationIsIP = 1;
         string[] rip = routingDestination.Split('.');
         if (rip.Length == 4)
             myRoutingDestination = new byte[] { (byte)Convert.ToInt32(rip[0]), (byte)Convert.ToInt32(rip[1]), (byte)Convert.ToInt32(rip[2]), (byte)Convert.ToInt32(rip[3]) };
     }
     if (IntPtr.Size == 8)
         pointer = daveNewExtendedConnection64(di.pointer, myDestination, myDestinationIsIP, rack, slot, Convert.ToInt32(routing), routingSubnetFirst, routingSubnetSecond, routingRack, routingSlot, myRoutingDestination, routingDestinationIsIP, PLCConnectionType, routingPLCConnectionType);
     else
         pointer = daveNewExtendedConnection32(di.pointer, myDestination, myDestinationIsIP, rack, slot, Convert.ToInt32(routing), routingSubnetFirst, routingSubnetSecond, routingRack, routingSlot, myRoutingDestination, routingDestinationIsIP, PLCConnectionType, routingPLCConnectionType);
 }
 public daveConnection(daveInterface di, int MPI, int rack, int slot)
 {
     if (IntPtr.Size == 8)
         pointer = daveNewConnection64(di.pointer, MPI, rack, slot);
     else
         pointer = daveNewConnection32(di.pointer, MPI, rack, slot);
 }
Exemple #14
0
 public static void daveSetTimeout(daveInterface di, int time)
 {
     imports.daveSetTimeout(di.pointer, time);
 }
Exemple #15
0
 public static int daveDisconnectAdapter(daveInterface di)
 {
     return(imports.daveDisconnectAdapter(di.pointer));
 }
Exemple #16
0
 public static int daveListReachablePartners(daveInterface di, byte[] buffer)
 {
     return(imports.daveListReachablePartners(di.pointer, buffer));
 }