I's like to simulate the behaviour of Dynamixel Pro's robot actuator, including the control table, please see it here.
I can simulate the robot actuator fine, but simulating the control table is a bit puzzling for me. The control table has address from 0 - 892.

One way I can think of doing this is to setup variables from _0 - _892, and populate them with corresponding values. Bt requires a large amount of getters and setters.

Another way is to use array address[892], and populate the corresponding values. But with array, I'm not sure if it is possible to limit read/write only entries.

Is there another way that I missed out to accomplish handling large variables that I am facing now?

Looking at that table the most obvious approach is to create a simple class that represents one row, with instance variables for each column. The whole table is then just a one-dimensional array of objects of that class. That array is also then 90% of what you need for a custom TableModel to display the whole thing in a JTabel.
The getters & setters may be just a bit tedious to write (or use Eclipse/Netbeans to generate them for you), but that's how you implement stuff like controlling R/W access to certain values.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.