How to create the queue array of class from text file

In reply to rupeshblr:

A few remarks first:
(1) Your text file has only 4 entries and not 5 as your packet has.
(2) You are defining a curious enumeration type. The first 2 entries are access types the last 2 are policies (RO, WO). I’d understand having RW as the first.
(3) Why do you need a class for your packet type? It could be simply a struct.

To split your read data into seperate data fields you can use the SV system function $fscanf.
See the details in chapter
21.3.4.3 Reading formatted data
of the IEEE of SV.