#!/usr/bin/env python
# -*- coding: euc-jp -*-



import sys



from omniORB import CORBA, PortableServer
import RTC
import OpenRTM__POA
import OpenRTM
import SDOPackage
import OpenRTM_aist












def main():
  corbaORB = CORBA.ORB_init(sys.argv)
  #poa = orb.resolve_initial_references("RootPOA")
  #poa._get_the_POAManager().activate()
  corbaNaming = OpenRTM_aist.CorbaNaming(corbaORB, "localhost")
  
  

  rtc = corbaNaming.resolve("ConfCallback0.rtc")._narrow(RTC.RTObject)

  key = "test"
  value = "50"
  properties = OpenRTM_aist.Properties()
  List = []
  
  conf = rtc.get_configuration()
  confSet = conf.get_configuration_set("default")

  

  OpenRTM_aist.NVUtil.copyToProperties(properties, confSet.configuration_data)

  properties.setProperty(key, value)

  OpenRTM_aist.NVUtil.copyFromProperties(List, properties)

  confSet.configuration_data = List

  conf.set_configuration_set_values(confSet)
  #properties.setProperty(key, value)

  conf.activate_configuration_set("default")
  
  corbaORB.destroy()
  
  return
    
############### test #################
if __name__ == '__main__':
  main()
