Getter and setter methods for packet->energy