Esempio n. 1
0
    def sendMessages(self, data_structs):
        self.portInterfaceAccess.acquire()
        try:
            outgoing = []
            for msg in data_structs:
                outgoing.append(CF.DataType(id=msg.getId(),value=struct_to_any(msg)))
            outmsg = props_to_any(outgoing)
        except:
            self.portInterfaceAccess.release()
            raise

        for connection in self._connections:
            try:
                self._connections[connection]['proxy_consumer'].push(outmsg)
            except:
                print "WARNING: Unable to send data to",connection
        self.portInterfaceAccess.release()
Esempio n. 2
0
    def sendMessages(self, data_structs):
        self.portInterfaceAccess.acquire()
        try:
            outgoing = []
            for msg in data_structs:
                outgoing.append(
                    CF.DataType(id=msg.getId(), value=struct_to_any(msg)))
            outmsg = props_to_any(outgoing)
        except:
            self.portInterfaceAccess.release()
            raise

        for connection in self._connections:
            try:
                self._connections[connection]['proxy_consumer'].push(outmsg)
            except:
                print "WARNING: Unable to send data to", connection
        self.portInterfaceAccess.release()
Esempio n. 3
0
    def sendMessage(self, data_struct):
        self.portInterfaceAccess.acquire()
        if not isinstance(data_struct, CORBA.Any):
            try:
                outgoing = [CF.DataType(id=data_struct.getId(),value=struct_to_any(data_struct))]
                outmsg = props_to_any(outgoing)
            except:
                self.portInterfaceAccess.release()
                raise
        else:
            outmsg = data_struct

        for connection in self._connections:
            try:
                self._connections[connection]['proxy_consumer'].push(outmsg)
            except:
                print "WARNING: Unable to send data to",connection
        self.portInterfaceAccess.release()
Esempio n. 4
0
    def sendMessage(self, data_struct):
        self.portInterfaceAccess.acquire()
        if not isinstance(data_struct, CORBA.Any):
            try:
                outgoing = [
                    CF.DataType(id=data_struct.getId(),
                                value=struct_to_any(data_struct))
                ]
                outmsg = props_to_any(outgoing)
            except:
                self.portInterfaceAccess.release()
                raise
        else:
            outmsg = data_struct

        for connection in self._connections:
            try:
                self._connections[connection]['proxy_consumer'].push(outmsg)
            except:
                print "WARNING: Unable to send data to", connection
        self.portInterfaceAccess.release()