Changeset 484 for cpp/frams


Ignore:
Timestamp:
03/26/16 01:33:55 (6 years ago)
Author:
Maciej Komosinski
Message:

fields -> neuroproperties, properties -> size

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/neuro/neuroimpl.cpp

    r375 r484  
    319319{"part",0,PARAM_READONLY,"The Part object where this neuron is located","o MechPart",GETONLY(part),},
    320320{"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"
    323323"Examples:\n"
    324324"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"
    326326"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"
    328328"\n"
    329329"The Interface object can be used to discover which fields are available for a certain neuron object:\n"
    330330"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"
    332332"var i;\n"
    333 "for(i=0;i<iobj.properties;i++)\n"
     333"for(i=0;i<iobj.size;i++)\n"
    334334" Simulator.print(iobj.getId(i)+\" (\"+iobj.getName(i)+\")\");",},
    335335{"def",0,PARAM_READONLY,"Neuron definition from which this live neuron was built","o NeuroDef",GETONLY(neurodef),},
     
    530530void NeuroImpl::createFieldsObject()
    531531{
    532 fields_param=new Param(paramentries?paramentries:(ParamEntry*)&empty_paramtab,this,"Fields");
     532fields_param=new Param(paramentries?paramentries:(ParamEntry*)&empty_paramtab,this,"NeuroProperties");
    533533fields_object=new ExtObject(fields_param);
    534534}
Note: See TracChangeset for help on using the changeset viewer.