Build a message.
161994
def message(message_type, payload, payload_length):
    
    return packet.build(
        Container(
            type=message_type,
            id=1,
            refer=0,
            sent=Container(
                secs=0,
                usecs=0
            ),
            recv=Container(
                secs=0,
                usecs=0
            ),
            payload_length=payload_length,
            payload=payload
        )
    )
884244
def build_payload(self, tag, message):
        
        message = self.encode(message)
        message = self.sign(message)
        payload = bytes(tag.encode('utf-8')) + message
        return payload
1146065
def emit_message(self, message, log_level):
        """"""
        self.log(message)
        if log_level == logging.ERROR:
            if self._error_msg_callback:
                self._error_msg_callback(message)
                return

        if log_level == logging.WARNING:
            if self._warning_msg_callback:
                self._warning_msg_callback(message)
                return

        if log_level == logging.INFO:
            if self._info_msg_callback:
                self._info_msg_callback(message)
                return

        if self._msg_callback:
            self._msg_callback(message)
901965
def log_to_file(self, message):
        """"""

        with self.build_fs.open(self.log_file, 'a+') as f:
            f.write(unicode(message + '\n'))
191384
def ProcessMessage(self, message):
    """"""
    self.ProcessResponse(message.source.Basename(), message.payload)
1217730
public MessageDialog build() {
        MessageDialog messageDialog = new MessageDialog(
                title,
                text,
                buttons.toArray(new MessageDialogButton[buttons.size()]));
        messageDialog.setHints(extraWindowHints);
        return messageDialog;
    }
1291994
def create_message(self):
        """"""
        self.counter += 1
        self._transport.send(
            "transient.transaction",
            "TXMessage #%d\n++++++++Produced@ %f"
            % (self.counter, (time.time() % 1000) * 1000),
        )
        self.log.info("Created message %d", self.counter)
310616
def created(message):
    """"""

    def create(value, _context, **_params):
        return Created(value, message)

    return create
1023647
def send(self, message, *args, **kwargs):
        '''
        
        '''
        self._messages.put((message, args, kwargs), False)
153503
def message(self, text):
        """"""
        line = 0
        # Iterate through each character.
        for char in text:
            # Advance to next line if character is a new line.
            if char == '\n':
                line += 1
                # Move to left or right side depending on text direction.
                col = 0 if self.displaymode & LCD_ENTRYLEFT > 0 else self._cols-1
                self.set_cursor(col, line)
            # Write the character to the display.
            else:
                self.write8(ord(char), True)
652623
def add_message(self, msg_content, folder, **kwargs):
        
        content = {'m': kwargs}
        content['m']['l'] = str(folder)
        content['m']['content'] = {'_content': msg_content}

        return self.request('AddMsg', content)
182435
def build_message(self, metric, value, timestamp, tags={}):
        """"""
        if not metric or metric.split(None, 1)[0] != metric:
            raise ValueError('"metric" must not have whitespace in it')
        if not isinstance(value, (int, float)):
            raise TypeError('"value" must be an int or a float, not a {}'.format(
                type(value).__name__))

        tags_suffix = ''.join(';{}={}'.format(x[0], x[1]) for x in sorted(tags.items()))

        message = u'{}{}{} {} {}\n'.format(
            self.prefix + '.' if self.prefix else '',
            metric,
            tags_suffix,
            value,
            int(round(timestamp))
        )
        message = message.encode('utf-8')
        return message
894669
def message(self, message, item, extra):
        """"""
        if item is not None:
            message += ": " + ascii(item)
        if extra is not None:
            message += " (" + str(extra) + ")"
        return message
163391
def create_message(
        json_meta, data, data_type=0, version=b'\x00\x01@\x00'):
    
    __check_data(data)
    meta = __prepare_meta(json_meta)
    data = __compress(json_meta, data)
    header = __create_machine_header(
        json_meta, data, data_type, version)

    return header + meta + data
1331189
def send_message(client, message):
    """"""
    print(message)
    client.send("HTTP/1.1 200 OK\r\n\r\n{}".format(message).encode("utf-8"))
    client.close()
1070809
def make_message(message, binary=False):
    """"""
    if isinstance(message, str):
        message = message.encode('utf-8')

    if binary:
        return _make_frame(message, OPCODE_BINARY)
    else:
        return _make_frame(message, OPCODE_TEXT)
297254
private String buildStopMessage() {
    JsonObject stopMessage = new JsonObject();
    stopMessage.addProperty(ACTION, STOP);
    return stopMessage.toString();
  }