- Timestamp:
- 03/26/16 01:33:55 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/neuro/neuroimpl.cpp
r375 r484 319 319 {"part",0,PARAM_READONLY,"The Part object where this neuron is located","o MechPart",GETONLY(part),}, 320 320 {"joint",0,PARAM_READONLY,"The Joint object where this neuron is located","o MechJoint",GETONLY(joint),}, 321 {" fields",0,PARAM_READONLY,"Custom neuron fields","o Fields",GETONLY(fields),322 "Neurons can have different fields depending on their class. Script neurons have their fields defined using the \"prop :\" syntax. If you develop a custom neuron script you should use the Fields object for accessing your own neuron fields. The Neuro.fields property is meant for accessing the neuron fields from the outside script.\n"321 {"neuroproperties",0,PARAM_READONLY,"Custom neuron fields","o NeuroProperties",GETONLY(fields), 322 "Neurons can have different fields depending on their class. Script neurons have their fields defined using the \"property:\" syntax. If you develop a custom neuron script you should use the NeuroProperties object for accessing your own neuron fields. The Neuro.neuroproperties property is meant for accessing the neuron fields from the outside script.\n" 323 323 "Examples:\n" 324 324 "var c=Populations.createFromString(\"X[N]\");\n" 325 "Simulator.print(\"standard neuron inertia=\"+c.getNeuro(0). fields.in);\n"325 "Simulator.print(\"standard neuron inertia=\"+c.getNeuro(0).neuroproperties.in);\n" 326 326 "c=Populations.createFromString(\"X[Nn,e:0.1]\");\n" 327 "Simulator.print(\"noisy neuron error rate=\"+c.getNeuro(0). fields.e);\n"327 "Simulator.print(\"noisy neuron error rate=\"+c.getNeuro(0).neuroproperties.e);\n" 328 328 "\n" 329 329 "The Interface object can be used to discover which fields are available for a certain neuron object:\n" 330 330 "c=Populations.createFromString(\"X[N]\");\n" 331 "var iobj=Interface.makeFrom(c.getNeuro(0). fields);\n"331 "var iobj=Interface.makeFrom(c.getNeuro(0).neuroproperties);\n" 332 332 "var i;\n" 333 "for(i=0;i<iobj. properties;i++)\n"333 "for(i=0;i<iobj.size;i++)\n" 334 334 " Simulator.print(iobj.getId(i)+\" (\"+iobj.getName(i)+\")\");",}, 335 335 {"def",0,PARAM_READONLY,"Neuron definition from which this live neuron was built","o NeuroDef",GETONLY(neurodef),}, … … 530 530 void NeuroImpl::createFieldsObject() 531 531 { 532 fields_param=new Param(paramentries?paramentries:(ParamEntry*)&empty_paramtab,this," Fields");532 fields_param=new Param(paramentries?paramentries:(ParamEntry*)&empty_paramtab,this,"NeuroProperties"); 533 533 fields_object=new ExtObject(fields_param); 534 534 }
Note: See TracChangeset
for help on using the changeset viewer.