Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpi4COM)  1.26.2
IFieldbus.idl
Go to the documentation of this file.
1 // -----------------------------------------------------------------------
2 // MLPI - <IFieldbus.idl>
3 // -----------------------------------------------------------------------
4 // Copyright (c) 2012 Bosch Rexroth. All rights reserved.
5 // Redistribution and use in source and binary forms of this MLPI software
6 // (SW) provided to you, with or without modification, are permitted
7 // without prior approval provided that the following conditions are met:
8 //
9 // 1. Redistributions of source code of SW must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 //
12 // 2. Redistributions in binary form of SW must reproduce the above copyright
13 // notice, this list of conditions and the following disclaimer in the
14 // documentation and/or other materials provided with the distribution.
15 //
16 // 3. User recognizes and acknowledges that it acquires no right,
17 // title or interest in or to any of the names or trademarks used in
18 // connection with the SW ("names") by virtue of this License and waives
19 // any right to or interest in the names. User recognizes and acknowledges
20 // that names of companies or names or products of companies displayed
21 // in the documentation of SW to indicate the interoperability of products
22 // with the SW are the names of their respective owners. The use of such
23 // names in the documentation of SW does not imply any sponsorship,
24 // approval, or endorsement by such companies of this product.
25 //
26 // 4. Modified code versions, i.e. any addition to or deletion from
27 // the substance or structure of the original code of the SW running
28 // the MLPI must be plainly marked as such and must not be misrepresented
29 // as being original SW.
30 //
31 // 5. The SW may only be used in connection with a Bosch Rexroth product.
32 //
33 // THIS INFORMATION IS PROVIDED BY BOSCH REXROTH CORPORATION "AS IS"
34 // AND WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING
35 // (BUT NOTLIMITED TO) ANY IMPLIED WARRANTIES OF MERCHANTABILITY,
36 // FITNESS FOR ANY PARTICULAR PURPOSE, OR NON-INFRINGEMENT. WHILE THE
37 // INFORMATION PROVIDED IS BELIEVED TO BE ACCURATE, IT MAY INCLUDE
38 // ERRORS OR INACCURACIES.
39 // SUBJECT TO COMPULSORY STATUTORY PROVISIONS OF THE GERMAN LAW AS
40 // THE APPLICABLE LAW FOR THIS LICENSE BOSCH REXROTH CORPORATION WILL
41 // NOT BE LIABLE FOR ANY DAMAGES OF ANY KIND ARISING FROM THE USE OF
42 // THE SOFTWARE DISTRIBUTED HEREUNDER, INCLUDING BUT NOT LIMITED TO
43 // DIRECT, INDIRECT, INCIDENTAL, PUNITIVE, AND CONSEQUENTIAL DAMAGES.
44 // -----------------------------------------------------------------------
45 //
55 //
56 // -----------------------------------------------------------------------
57 
58 
59 
64 [
65  object,
66  uuid(C93E9AA2-7761-4AEE-9112-B43D8FA858A1),
67  dual,
68  nonextensible,
69  helpstring("IFieldbus Interface"),
70  pointer_default(unique)
71 ]
72 interface IFieldbus : IDispatch{
73 
76  typedef [v1_enum] enum IoFieldbusMasterType
77  {
89 
92  typedef [v1_enum] enum IoFieldbusArea
93  {
97 
98 #if defined(WIN32) || defined(WIN64)
99  [
100  uuid(1EE87246-4A11-4b21-A20B-3BC432D1A6ED)
101  ]
110  struct IoHandle
111  {
112  LONG ident;
113  LONG hash;
114  };
115 
116  [
117  uuid(5358C15D-48DC-49f6-A973-63B6DE640019)
118  ]
126  struct IoDiagnosis
127  {
128  ULONG flags;
129  };
130 
131 
132  [
133  uuid(0AF14472-E6D9-4521-9EE9-29F77C5EE03D)
134  ]
148  {
149  struct IoHandle handle;
150  BSTR name;
151  struct IoDiagnosis diagnosis;
152  BSTR address;
153  LONG numberOfInputs;
154  LONG numberOfOutputs;
155  };
156 
169  {
170  struct IoHandle handle;
171  BSTR name;
172  struct IoDiagnosis diagnosis;
174  LONG numberOfSlaves;
175  };
176 
177 
204  [id(1), helpstring("Method ReadFieldbusMasterInfo")] HRESULT ReadFieldbusMasterInfo([out, retval] struct IoFieldbusMasterInfo *masterInfo);
205 
206 
213  [id(2), helpstring("Method UpdateFieldbusIo")] HRESULT UpdateFieldbusIo();
214 
251  [id(3), helpstring("Method ReadFieldbusSlaveInfos")] HRESULT ReadFieldbusSlaveInfos([out, retval] SAFEARRAY(struct IoFieldbusSlaveInfo) *slaveInfos);
252 #endif
253 
265  [id(4), helpstring("Method WriteFieldbusIoAsByteArray")] HRESULT WriteFieldbusIoAsByteArray([in] BSTR slaveAddress, [in] IoFieldbusArea area, [in] LONG byteOffset, [in] LONG byteLength, [in] SAFEARRAY(BYTE) data);
266 
278  [id(5), helpstring("Method ReadFieldbusIoAsByteArray")] HRESULT ReadFieldbusIoAsByteArray([in] BSTR slaveAddress, [in] IoFieldbusArea area, [in] LONG byteOffset, [in] LONG byteLength, [out, retval] SAFEARRAY(BYTE) *data);
279 
280 };
281 
282 
283 
284 // -----------------------------------------------------------------------
285 // HISTORY
286 // -----------------------------------------------------------------------
287 // 01-Jan-2012
288 // - first release
289 //
290 
291 
292 
293 
294 
Input area of a fieldbus device.
Definition: IFieldbus.idl:94
This structure defines the diagnosis information of a fieldbus device.
Definition: IFieldbus.idl:126
This structure defines the information of a fieldbus slave.
Definition: IFieldbus.idl:147
HRESULT ReadFieldbusIoAsByteArray([in] BSTR slaveAddress, [in] IoFieldbusArea area, [in] LONG byteOffset, [in] LONG byteLength, [out, retval] SAFEARRAY(BYTE)*data)
This function reads a byte array from the fieldbus slave.
IoFieldbusMasterType
This enumeration defines types of fieldbus master.
Definition: IFieldbus.idl:76
This structure defines the information of a fieldbus master.
Definition: IFieldbus.idl:168
HRESULT WriteFieldbusIoAsByteArray([in] BSTR slaveAddress, [in] IoFieldbusArea area, [in] LONG byteOffset, [in] LONG byteLength, [in] SAFEARRAY(BYTE) data)
This function writes a byte array to the fieldbus slave.
IoFieldbusArea
This enumeration defines the I/O areas &#39;Input&#39; and &#39;Output&#39; of a fieldbus device. ...
Definition: IFieldbus.idl:92
Generic, not all feature are supported.
Definition: IFieldbus.idl:78
This structure defines the handle of a fieldbus device.
Definition: IFieldbus.idl:110
Definition of the IFieldbus interface which gives access to the data of a single fieldbus.
Definition: IFieldbus.idl:72
HRESULT ReadFieldbusSlaveInfos([out, retval] SAFEARRAY(struct IoFieldbusSlaveInfo)*slaveInfos)
This function returns an array with information about the slaves connected to this fieldbus...
Output area of a fieldbus device.
Definition: IFieldbus.idl:95
HRESULT ReadFieldbusMasterInfo([out, retval] struct IoFieldbusMasterInfo *masterInfo)
This function returns miscellaneous information about the given master. This includes its name...
HRESULT UpdateFieldbusIo()
This method performs a bus cycle in order to update the fieldbus I/Os of all attached slaves of the f...