Read the value of Register
Not sure if it is an issue, but I how do I read a register value outside the p4 program? Is it possible to do it from the p4runtime?
I'm not sure if I understand your question, but you can try to create a register.h file for example, and include this file in the p4 program.
register.h to store hex.
#define REGISTER(N) {0:N(0xc1c15899)}
program.p4
#include "register.h"
You can also create tables for information parameters, and with that insert through p4runtime-shell.
Thank you. I understand how to define a register in the p4 program. I dont understand how to query its value from the runtime shell.
If you are using p4runtime-shell with the simple_switch_grpc process, then its P4Runtime API support today does not support reading & writing registers via the P4Runtime API. Support would have to be added there before it could possibly work via p4runtime-shell, if I understand correctly: https://github.com/p4lang/PI/issues/376