A cyber-physical energy system consists of information and communication technology, advanced power electronic devices, energy sources, and smart appliances. A simulator is required for research and to further enhancements in the cyber-physical energy system. The integration of a power system and information and communication technology raises the problem of integration of time-driven activity and event-driven activity. The power system simulators are time-driven, while the network communication simulators are event-driven. The Pacific Northwest National Laboratory, Richland, Washington developed a tool named 'framework for network co-simulation (FNCS)' which co-simulates ns-3 (a network simulator) and GridLAB-D (a power distribution system simulator). This work details the enhancement of the FNCS application program (which is integrated into ns-3) to incorporate the functionalities, namely: 1) internal real-time price calculation; 2) day-ahead charging schedule of a battery. The enhancement has been used for the development of cyber-physical application programs, namely, internal real-time pricing and battery charging schedules.