001: /*
002: * DDS (Data Distribution Service) for JacORB
003: *
004: * Copyright (C) 2005 , Ahmed yehdih <ahmed.yehdih@gmail.com>, fouad
005: * allaoui <fouad.allaoui@gmail.com>, Didier Donsez (didier.donsez@ieee.org)
006: *
007: * This program is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU Library General Public License
009: * as published by the Free Software Foundation; either version 2
010: * of the License, or (at your option) any later version.
011: *
012: * This program is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
015: * GNU Library General Public License for more details.
016: *
017: * You should have received a copy of the GNU Library General Public
018: * License along with this program; if not, write to the Free Software
019: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
020: * 02111-1307, USA.
021: *
022: * Coontact: Ahmed yehdih <ahmed.yehdih@gmail.com>, fouad allaoui
023: * <fouad.allaoui@gmail.com>, Didier Donsez (didier.donsez@ieee.org)
024: * Contributor(s)
025: *
026: **/
027: package demo.dds.dcps.temperaturesample;
028:
029: import org.jacorb.dds.Supplier;
030: import org.omg.dds.DataWriterListener;
031: import org.omg.dds.DataWriterQos;
032: import org.omg.dds.DataWriterQosHolder;
033: import org.omg.dds.InstanceHandleSeqHolder;
034: import org.omg.dds.LivelinessLostStatus;
035: import org.omg.dds.OfferedDeadlineMissedStatus;
036: import org.omg.dds.OfferedIncompatibleQosStatus;
037: import org.omg.dds.PublicationMatchStatus;
038: import org.omg.dds.Publisher;
039: import org.omg.dds.StatusCondition;
040: import org.omg.dds.SubscriptionBuiltinTopicDataHolder;
041: import org.omg.dds.Time_t;
042: import org.omg.dds.Topic;
043:
044: public class TemperatureDataWriterImpl extends TemperatureDataWriterPOA {
045:
046: private DataWriterQos qos;
047: private DataWriterListener a_listener;
048: private Publisher PubParent;
049: private Topic topic;
050: org.omg.CORBA.ORB orb;
051: org.omg.PortableServer.POA poa;
052: // put instance of Temperature in channel event
053: private Supplier _Supplier;
054:
055: /**
056: * @param qos
057: * @param a_listener
058: * @param pubParent
059: * @param topic_name
060: */
061: public TemperatureDataWriterImpl(DataWriterQos qos,
062: DataWriterListener a_listener, Publisher pubParent,
063: Topic topic, org.omg.CORBA.ORB orb,
064: org.omg.PortableServer.POA poa) {
065: this .orb = orb;
066: this .poa = poa;
067: this .qos = qos;
068: this .a_listener = a_listener;
069: PubParent = pubParent;
070: this .topic = topic;
071: _Supplier = new Supplier(orb, poa);
072: }
073:
074: /**
075: * Not Implemented
076: */
077: public int register(Temperature instance_data) {
078: return 0;
079: }
080:
081: /**
082: * Not Implemented
083: */
084: public int register_w_timestamp(Temperature instance_data,
085: int handle, Time_t source_timestamp) {
086: return 0;
087: }
088:
089: /**
090: * Not Implemented
091: */
092: public int unregister(Temperature instance_data, int handle) {
093: return 0;
094: }
095:
096: /**
097: * Not Implemented
098: */
099: public int unregister_w_timestamp(Temperature instance_data,
100: int handle, Time_t source_timestamp) {
101: return 0;
102: }
103:
104: public int write(Temperature instance_data, int handle) {
105: _Supplier.Write(topic, instance_data);
106: return 0;
107: }
108:
109: public int write_w_timestamp(Temperature instance_data, int handle,
110: Time_t source_timestamp) {
111: return 0;
112: }
113:
114: /**
115: * Not Implemented
116: */
117: public int dispose(Temperature instance_data, int instance_handle) {
118: return 0;
119: }
120:
121: /**
122: * Not Implemented
123: */
124: public int dispose_w_timestamp(Temperature instance_data,
125: int instance_handle, Time_t source_timestamp) {
126: return 0;
127: }
128:
129: /**
130: * Not Implemented
131: */
132: public int get_key_value(TemperatureHolder key_holder, int handle) {
133: return 0;
134: }
135:
136: /**
137: * Not Implemented
138: */
139: public int set_qos(DataWriterQos qos) {
140: return 0;
141: }
142:
143: /**
144: * Not Implemented
145: */
146: public void get_qos(DataWriterQosHolder qos) {
147: }
148:
149: /**
150: * Not Implemented
151: */
152: public int set_listener(DataWriterListener a_listener, int mask) {
153: return 0;
154: }
155:
156: /**
157: * Not Implemented
158: */
159: public DataWriterListener get_listener() {
160: return null;
161: }
162:
163: /**
164: * Not Implemented
165: */
166: public Topic get_topic() {
167: return null;
168: }
169:
170: /**
171: * @return PubParent
172: */
173: public Publisher get_publisher() {
174: return PubParent;
175: }
176:
177: /**
178: * Not Implemented
179: */
180: public LivelinessLostStatus get_liveliness_lost_status() {
181: return null;
182: }
183:
184: /**
185: * Not Implemented
186: */
187: public OfferedDeadlineMissedStatus get_offered_deadline_missed_status() {
188: return null;
189: }
190:
191: /**
192: * Not Implemented
193: */
194: public OfferedIncompatibleQosStatus get_offered_incompatible_qos_status() {
195: return null;
196: }
197:
198: /**
199: * Not Implemented
200: */
201: public PublicationMatchStatus get_publication_match_status() {
202: return null;
203: }
204:
205: /**
206: * Not Implemented
207: */
208: public void assert_liveliness() {
209: }
210:
211: /**
212: * Not Implemented
213: */
214: public int get_matched_subscriptions(
215: InstanceHandleSeqHolder subscription_handles) {
216: return 0;
217: }
218:
219: /**
220: * Not Implemented
221: */
222: public int get_matched_subscription_data(
223: SubscriptionBuiltinTopicDataHolder subscription_data,
224: int subscription_handle) {
225: return 0;
226: }
227:
228: /**
229: * Not Implemented
230: */
231: public int enable() {
232: return 0;
233: }
234:
235: /**
236: * Not Implemented
237: */
238: public StatusCondition get_statuscondition() {
239: return null;
240: }
241:
242: /**
243: * Not Implemented
244: */
245: public int get_status_changes() {
246: return 0;
247: }
248:
249: /**
250: * @return Returns the pubParent.
251: */
252: public Publisher getPubParent() {
253: return PubParent;
254: }
255:
256: /**
257: * @return Returns the topic_name.
258: */
259: public Topic getTopic() {
260: return topic;
261: }
262: }
|