| /* Copyright (c) 2000-2019 Ericsson Telecom AB |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html |
| * |
| * Contributors: |
| * Michael Josenhans |
| ******************************************************************************/ |
| |
| module J1939 { |
| import from General_Types all; |
| |
| const octetstring J1939_MAX_UNICAST_ADDR := 'FD'O |
| const octetstring J1939_IDLE_ADDR := 'FE'O |
| const octetstring J1939_NO_ADDR := 'FF'O |
| const J1939_NAME J1939_NO_NAME := '0000000000000000'O |
| const octetstring J1939_PGN_REQUEST := '00ea00'O /* Request PG */ |
| const octetstring J1939_PGN_ADDRESS_CLAIMED := '00ee00'O /* Address Claimed */ |
| const octetstring J1939_PGN_ADDRESS_COMMANDED := '00fed8'O /* Commanded Address */ |
| const octetstring J1939_PGN_PDU1_MAX := '03ff00'O |
| const octetstring J1939_PGN_MAX := '03ffff'O |
| const octetstring J1939_NO_PGN := '040000'O |
| |
| type OCT3 J1939_PGN // max 0x3ffff |
| type OCT8 J1939_NAME |
| type OCT1 J1939_ADDR |
| |
| |
| type integer J1939_Priority (0..7) |
| |
| type record J1939_hdr{ |
| J1939_NAME name optional, |
| // pgn: |
| // * 8 bit: PS in PDU2 case, else 0 |
| // * 8 bit: PF |
| // * 1 bit: DP |
| // * 1 bit: reserved |
| J1939_PGN pgn optional, |
| // * 1 byte address * |
| J1939_ADDR addr optional |
| } |
| |
| } |