/** Adds the object as a member of this structure. This object is appended to the list of members within. <br> * * @param member */ public void addMember(Object member) throws JIException { //null has to be allowed for members who would like to send null...NPE should not be thrown addMember(listOfMembers.size(),member); }
/** Adds the object as a member of this structure. This object is appended to the list of members within. <br> * * @param member */ public void addMember(Object member) throws JIException { //null has to be allowed for members who would like to send null...NPE should not be thrown addMember(listOfMembers.size(),member); }
/** * Adds the object as a member of this structure. This object is appended to * the list of members within. <br> * * @param member */ public void addMember ( final Object member ) throws JIException { //null has to be allowed for members who would like to send null...NPE should not be thrown addMember ( this.listOfMembers.size (), member ); }
public static JIStruct getStruct () throws JIException { JIStruct struct = new JIStruct (); struct.addMember ( Integer.class ); // Server handle struct.addMember ( Short.class ); // data type struct.addMember ( Short.class ); // reserved struct.addMember ( Integer.class ); // access rights struct.addMember ( Integer.class ); // blob size // grab the normally unused byte array struct.addMember ( new JIPointer ( new JIArray ( Byte.class, null, 1, true, false ) ) ); return struct; }
/** * Create an out struct definition of this object that may be use in a call object * @return * The OPC struct definition */ public static final JIStruct fileTimeOutStruct(){ JIStruct struct=new JIStruct(); try { struct.addMember(Integer.class);//Low date time struct.addMember(Integer.class);//High date time return struct; } catch (JIException e) {// Can't occur throw new RuntimeException("Add member error"); } }
/** * Create an out struct definition of this object that may be use in a call object * @return * The OPC struct definition */ public static final JIStruct fileTimeOutStruct(){ JIStruct struct=new JIStruct(); try { struct.addMember(Integer.class);//Low date time struct.addMember(Integer.class);//High date time return struct; } catch (JIException e) {// Can't occur throw new RuntimeException("Add member error"); } }
private JIStruct prepareForReleaseRef ( final String IPID, final int numInstancesfirsttime ) throws JIException { final JIStruct remInterface = new JIStruct (); remInterface.addMember ( new rpc.core.UUID ( IPID ) ); remInterface.addMember ( new Integer ( numInstancesfirsttime + 5 ) ); // numInstancesfirsttime of the original and 5 for the addRef done later on. remInterface.addMember ( new Integer ( 0 ) );//private refs = 0 logger.warn ( "prepareForReleaseRef: Releasing numInstancesfirsttime + 5 references of IPID: {} session: {} , numInstancesfirsttime is {}", new Object[] { IPID, getSessionIdentifier (), numInstancesfirsttime } ); debug_delIpids ( IPID, numInstancesfirsttime + 5 ); return remInterface; }
private JIStruct prepareForReleaseRef(String IPID) throws JIException { JIStruct remInterface = new JIStruct(); remInterface.addMember(new rpc.core.UUID(IPID)); remInterface.addMember(new Integer(5 + 5)); // 5 of the original and 5 for the addRef done later on. remInterface.addMember(new Integer(0));//private refs = 0 if (JISystem.getLogger().isLoggable(Level.WARNING)) { JISystem.getLogger().warning("prepareForReleaseRef: Releasing 10 references of IPID: " + IPID + " session: " + getSessionIdentifier()); debug_delIpids(IPID, 10); } return remInterface; }
public void getSimpleStruct ( final String[] args ) throws JIException, InterruptedException, UnknownHostException { final JICallBuilder callObject = new JICallBuilder ( true ); callObject.setOpnum ( 12 ); //obtained from the IDL or TypeLib. // Object results[]; final JIStruct struct = new JIStruct (); struct.addMember ( Integer.class ); struct.addMember ( Double.class ); struct.addMember ( Float.class ); callObject.addOutParamAsObject ( new JIPointer ( struct ), JIFlags.FLAG_NULL ); results = this.comObject.call ( callObject ); System.out.println ( results[0] ); }
private JIStruct prepareForReleaseRef(String IPID, int numInstancesfirsttime) throws JIException { JIStruct remInterface = new JIStruct(); remInterface.addMember(new rpc.core.UUID(IPID)); remInterface.addMember(new Integer(numInstancesfirsttime + 5)); // numInstancesfirsttime of the original and 5 for the addRef done later on. remInterface.addMember(new Integer(0));//private refs = 0 if (JISystem.getLogger().isLoggable(Level.INFO)) { JISystem.getLogger().warning("prepareForReleaseRef: Releasing numInstancesfirsttime + 5 references of IPID: " + IPID + " session: " + getSessionIdentifier() + " , numInstancesfirsttime is " + numInstancesfirsttime); } debug_delIpids(IPID, numInstancesfirsttime + 5); return remInterface; }
public void getSimpleStruct(String[] args) throws JIException, InterruptedException, UnknownHostException { JICallBuilder callObject = new JICallBuilder( true); callObject.setOpnum(12); //obtained from the IDL or TypeLib. // Object results[]; JIStruct struct = new JIStruct(); struct.addMember(Integer.class); struct.addMember(Double.class); struct.addMember(Float.class); callObject.addOutParamAsObject(new JIPointer(struct), JIFlags.FLAG_NULL); results = comObject.call(callObject); System.out.println(results[0]); }
public void getSimpleStruct(String[] args) throws JIException, InterruptedException, UnknownHostException { JICallBuilder callObject = new JICallBuilder( true); callObject.setOpnum(12); //obtained from the IDL or TypeLib. // Object results[]; JIStruct struct = new JIStruct(); struct.addMember(Integer.class); struct.addMember(Double.class); struct.addMember(Float.class); callObject.addOutParamAsObject(new JIPointer(struct), JIFlags.FLAG_NULL); results = comObject.call(callObject); System.out.println(results[0]); }
public void getConformantStruct(String[] args) throws JIException, InterruptedException, UnknownHostException { JICallBuilder callObject = new JICallBuilder( true); callObject.setOpnum(14); //obtained from the IDL or TypeLib. // Object results[]; JIStruct struct = new JIStruct(); struct.addMember(Integer.class); struct.addMember(Double.class); struct.addMember(JIUnsignedShort.class); JIArray longArray = new JIArray(Integer.class, null, 1, true); struct.addMember(new JIPointer(longArray)); callObject.addOutParamAsObject(new JIPointer(struct), JIFlags.FLAG_NULL); results = comObject.call(callObject); System.out.println(results[0]); }
public void getConformantStruct ( final String[] args ) throws JIException, InterruptedException, UnknownHostException { final JICallBuilder callObject = new JICallBuilder ( true ); callObject.setOpnum ( 14 ); //obtained from the IDL or TypeLib. // Object results[]; final JIStruct struct = new JIStruct (); struct.addMember ( Integer.class ); struct.addMember ( Double.class ); struct.addMember ( JIUnsignedShort.class ); final JIArray longArray = new JIArray ( Integer.class, null, 1, true ); struct.addMember ( new JIPointer ( longArray ) ); callObject.addOutParamAsObject ( new JIPointer ( struct ), JIFlags.FLAG_NULL ); results = this.comObject.call ( callObject ); System.out.println ( results[0] ); }
public void GetStruct(String[] args) throws JIException, InterruptedException, UnknownHostException { JICallBuilder callObject = new JICallBuilder( true); callObject.setOpnum(10); //obtained from the IDL or TypeLib. // Object results[]; // change the struct to have the array as the last item JIStruct struct = new JIStruct(); JIArray longArray = new JIArray(Integer.class, new int[]{50},1,false); struct.addMember(Integer.class); struct.addMember(Float.class); struct.addMember(longArray); callObject.addOutParamAsObject(new JIPointer(struct), JIFlags.FLAG_NULL); results = comObject.call(callObject); System.out.println(results[0]); }
public void GetStruct ( final String[] args ) throws JIException, InterruptedException, UnknownHostException { final JICallBuilder callObject = new JICallBuilder ( true ); callObject.setOpnum ( 10 ); //obtained from the IDL or TypeLib. // Object results[]; // change the struct to have the array as the last item final JIStruct struct = new JIStruct (); final JIArray longArray = new JIArray ( Integer.class, new int[] { 50 }, 1, false ); struct.addMember ( Integer.class ); struct.addMember ( Float.class ); struct.addMember ( longArray ); callObject.addOutParamAsObject ( new JIPointer ( struct ), JIFlags.FLAG_NULL ); results = this.comObject.call ( callObject ); System.out.println ( results[0] ); }
public void getSimpleStructArray(String[] args) throws JIException, InterruptedException, UnknownHostException { JICallBuilder callObject = new JICallBuilder( true); callObject.setOpnum(13); //obtained from the IDL or TypeLib. // Object results[]; callObject.addOutParamAsType(JIUnsignedShort.class, JIFlags.FLAG_NULL); JIStruct struct = new JIStruct(); struct.addMember(Integer.class); struct.addMember(Double.class); struct.addMember(Float.class); JIArray DataArray = new JIArray(struct, null, 1, true); callObject.addOutParamAsObject(new JIPointer(DataArray), JIFlags.FLAG_NULL); results = comObject.call(callObject); System.out.println(((JIUnsignedShort)results[0]).getValue()); }
public void getSimpleStructArray(String[] args) throws JIException, InterruptedException, UnknownHostException { JICallBuilder callObject = new JICallBuilder( true); callObject.setOpnum(13); //obtained from the IDL or TypeLib. // Object results[]; callObject.addOutParamAsType(JIUnsignedShort.class, JIFlags.FLAG_NULL); JIStruct struct = new JIStruct(); struct.addMember(Integer.class); struct.addMember(Double.class); struct.addMember(Float.class); JIArray DataArray = new JIArray(struct, null, 1, true); callObject.addOutParamAsObject(new JIPointer(DataArray), JIFlags.FLAG_NULL); results = comObject.call(callObject); System.out.println(((JIUnsignedShort)results[0]).getValue()); }