Returns this message in an over-the-wire format.
509422
def Pack(self):
        """"""
        return struct.pack(self.format, self.command, self.arg0, self.arg1,
                           len(self.data), self.checksum, self.magic)
295832
public byte[] getMessage() {
        byte results[] = new byte[6];

        results[0] = (byte)(reference >> 8);
        results[1] = (byte)(reference & 0xFF);
        results[2] = (byte)(andMask >> 8);
        results[3] = (byte)(andMask & 0xFF);
        results[4] = (byte)(orMask >> 8);
        results[5] = (byte)(orMask & 0xFF);

        return results;
    }
1186253
def new_message(self):
        
        msg = {}
        msg['data'] = []
        msg['type'] = self.plugin_type
        msg['source'] = self.name
        msg['ts'] = (datetime.datetime.utcnow() - datetime.datetime(1970, 1, 1)).total_seconds()
        return msg
685987
def get_attached_message(self, key, message_type, required=False):
    """"""
    return self._spec.get_attached_message(key, message_type,
                                           tags=self._tags, required=required)
321476
public String getDetailedMessage() {
        String prepend = getSourceInfoMessage();
        if (prepend == null || prepend.length() == 0) {
            return mMessage;
        }
        else {
            return prepend + ": " + mMessage;
        }
    }
191670
public byte[] getMessage() {
        byte request[] = new byte[1 + 7 * records.length];

        int offset = 0;
        request[offset++] = (byte)(request.length - 1);

        for (RecordRequest record : records) {
            record.getRequest(request, offset);
            offset += 7;
        }
        return request;
    }
697765
@Override
    public String getFormattedMessage() {
        // LOG4J2-763: cache formatted string in case obj changes later
        if (arrayString == null) {
            arrayString = Arrays.toString(array);
        }
        return arrayString;
    }
350794
@Override
    public String getFormattedMessage() {
        if (formattedMessage == null) {
            if (message == null) {
                message = getMessage(messagePattern, argArray, throwable);
            }
            formattedMessage = message.getFormattedMessage();
        }
        return formattedMessage;
    }
880241
public String getMessage()
    {
        String trace;
        if ( node != null )
            trace = " : at Line: "+ node.getLineNumber()
                + " : in file: "+ node.getSourceFile()
                + " : "+node.getText();
        else
            // Users should not normally see this.
            trace = ": <at unknown location>";

        if ( callstack != null )
            trace = trace +"\n" + getScriptStackTrace();

        return getRawMessage() + trace;
    }
1153988
def from_raw_message(cls, rawmessage):
        """"""
        userdata = Userdata.from_raw_message(rawmessage[11:25])
        return ExtendedReceive(rawmessage[2:5],
                               rawmessage[5:8],
                               {'cmd1': rawmessage[9],
                                'cmd2': rawmessage[10]},
                               userdata,
                               flags=rawmessage[8])
755138
def fromMessage(cls, message):
        """"""
        error_text = message.getArg(
            OPENID_NS, 'error', '<no error message supplied>')
        error_code = message.getArg(OPENID_NS, 'error_code')
        return cls(error_text, error_code, message)
272575
def get_details(self):
        
        strval = str(self.wrong_value)
        if len(strval) > self.__max_str_length_displayed__:
            return '(Actual value is too big to be printed in this message)'
        else:
            return 'Wrong value: [{}]'.format(self.wrong_value)
456674
def get_message(self, set_slave_ok, sock_info, use_cmd=False):
        """"""
        if set_slave_ok:
            # Set the slaveOk bit.
            flags = self.flags | 4
        else:
            flags = self.flags

        ns = self.namespace()
        spec = self.spec

        if use_cmd:
            spec = self.as_command(sock_info)[0]
            if sock_info.op_msg_enabled:
                request_id, msg, size, _ = _op_msg(
                    0, spec, self.db, self.read_preference,
                    set_slave_ok, False, self.codec_options,
                    ctx=sock_info.compression_context)
                return request_id, msg, size
            ns = _UJOIN % (self.db, "$cmd")
            ntoreturn = -1  # All DB commands return 1 document
        else:
            # OP_QUERY treats ntoreturn of -1 and 1 the same, return
            # one document and close the cursor. We have to use 2 for
            # batch size if 1 is specified.
            ntoreturn = self.batch_size == 1 and 2 or self.batch_size
            if self.limit:
                if ntoreturn:
                    ntoreturn = min(self.limit, ntoreturn)
                else:
                    ntoreturn = self.limit

        if sock_info.is_mongos:
            spec = _maybe_add_read_preference(spec,
                                              self.read_preference)

        return query(flags, ns, self.ntoskip, ntoreturn,
                     spec, None if use_cmd else self.fields,
                     self.codec_options, ctx=sock_info.compression_context)
656119
public AisMessage getMessage() {
		AisMessage m = aisParser.parse(aisMessage, nmea.getSource(), padBits);
		return m;
	}
840376
def message(self):
        ''' '''
        name = self.__class__.__name__
        return "{0} {1}".format(humanize(name),
                                pp(*self.expectedArgs, **self.expectedKwArgs))
514067
def message(self, to, subject, text):
        """"""
        return self.compose(to, subject, text)
1339043
def generate_messages_info(msgs):
    """"""

    for msg in msgs:
        msg.swift_name = camel_case_from_underscores(msg.name)

        msg.formatted_description = ""
        if msg.description:
            msg.description = " ".join(msg.description.split())
            msg.formatted_description = "\n/**\n    %s\n*/\n" % " ".join(msg.description.split())
        msg.message_description = msg.description.replace('"','\\"')

        for field in msg.ordered_fields:
            field.swift_name = lower_camel_case_from_underscores(field.name)
            field.return_type = swift_types[field.type][0]
            
            # configure fields initializers
            if field.enum:
                # handle enums
                field.return_type = camel_case_from_underscores(field.enum)
                field.initial_value = "try data.mavEnumeration(offset: %u)" % field.wire_offset
            elif field.array_length > 0:
                if field.return_type == "String":
                    # handle strings
                    field.initial_value = "data." + swift_types[field.type][2] % (field.wire_offset, field.array_length)
                else:
                    # other array types
                    field.return_type = "[%s]" % field.return_type
                    field.initial_value = "try data.mavArray(offset: %u, count: %u)" % (field.wire_offset, field.array_length)
            else:
                # simple type field
                field.initial_value = "try data." + swift_types[field.type][2] % field.wire_offset
            
            field.formatted_description = ""
            if field.description:
                field.description = " ".join(field.description.split())
                field.formatted_description = "\n\t/// " + field.description + "\n"
         
        fields_info = map(lambda field: '("%s", %u, "%s", "%s")' % (field.swift_name, field.wire_offset, field.return_type, field.description.replace('"','\\"')), msg.fields)
        msg.fields_info = ", ".join(fields_info)

    msgs.sort(key = lambda msg : msg.id)