range check incomming opcodes and pids