001package jmri.jmrix.roco.z21; 002 003/** 004 * Package protected class containing common methods for Z21 Messages and Replies. 005 * 006 * @author Paul Bender Copyright (C) 2019 007 */ 008class Z21MessageUtils { 009 010 static String interpretBroadcastFlags(int[] elements) { 011 int flags = elements[4] + (elements[5] << 8) + (elements[6] << 16) + (elements[7] << 24); 012 return Integer.toString(flags); 013 } 014 015 static int integer16BitFromOffeset(int[] elements,int offset){ 016 return ((0xff&elements[offset+1])<<8) + 017 (0xff&(elements[offset])); 018 } 019}