// Check if msg exists and has the required propertiesif (msg &&msg.data !==undefined&&msg.port ===85) {var data =msg.data;// Extracting doorOpen value from the datavar doorOpen = data ===30001?1:0;return { msg: { doorOpen: doorOpen, ts:msg.ts, data:msg.data, rssi:msg.rssi }, metadata: {}, msgType:'POST_TELEMETRY_REQUEST' };}// Return null if required properties are not presentreturnnull;