Changeset 127


Ignore:
Timestamp:
02/10/14 20:13:23 (11 years ago)
Author:
sz
Message:

bug fixed: all param items having GETONLY accessor must also have PARAM_READONLY flag

Location:
cpp/frams
Files:
3 edited

Legend:

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

    r121 r127  
    300300{"getInputSum",0,0,"Get signal sum","p f(d input)",PROCEDURE(p_getsum),},
    301301{"getWeightedInputSum",0,0,"Get weighted signal sum","p f(d input)",PROCEDURE(p_getwsum),"Uses any number of inputs starting with the specified input. getWeightedInputSum(0)=weightedInputSum"},
    302 {"getInputCount",0,0,"Get input count","d",GETONLY(count),},
    303 {"inputSum",0,0,"Full signal sum","f",GETONLY(sum),},
    304 {"weightedInputSum",0,0,"Full weighted signal sum","f",GETONLY(wsum),},
     302{"getInputCount",0,PARAM_READONLY,"Get input count","d",GETONLY(count),},
     303{"inputSum",0,PARAM_READONLY,"Full signal sum","f",GETONLY(sum),},
     304{"weightedInputSum",0,PARAM_READONLY,"Full weighted signal sum","f",GETONLY(wsum),},
    305305{"getInputChannelCount",0,0,"Get channel count for input","p d(d input)",PROCEDURE(p_getchancount),},
    306306{"getInputStateChannel",0,0,"Get input signal from channel","p f(d input,d channel)",PROCEDURE(p_getchan),},
     
    313313{"currState",0,0,"Current neuron state (channel 0)","f",GETSET(cstate),"When read, it behaves just like the 'state' field.\nWhen written, changes the current neuron state immediately, which disturbs the regular synchronous NN operation.\nThis feature should only be used while controlling the neuron 'from outside' (like a neuro probe) and not in the neuron definition. See also: Neuro.hold",},
    314314{"setCurrStateChannel",0,0,"Set current neuron state for channel","p(d channel,f value)",PROCEDURE(p_setcstate),"Analogous to \"currState\"."},
    315 {"position_x",0,0,"Position x","f",GETONLY(position_x),},
    316 {"position_y",0,0,"Position y","f",GETONLY(position_y),},
    317 {"position_z",0,0,"Position z","f",GETONLY(position_z),},
    318 {"creature",0,0,"Gets owner creature","o Creature",GETONLY(creature),},
    319 {"part",0,0,"The Part object where this neuron is located","o MechPart",GETONLY(part),},
    320 {"joint",0,0,"The Joint object where this neuron is located","o MechJoint",GETONLY(joint),},
    321 {"fields",0,0,"Custom neuron fields","o Fields",GETONLY(fields),
     315{"position_x",0,PARAM_READONLY,"Position x","f",GETONLY(position_x),},
     316{"position_y",0,PARAM_READONLY,"Position y","f",GETONLY(position_y),},
     317{"position_z",0,PARAM_READONLY,"Position z","f",GETONLY(position_z),},
     318{"creature",0,PARAM_READONLY,"Gets owner creature","o Creature",GETONLY(creature),},
     319{"part",0,PARAM_READONLY,"The Part object where this neuron is located","o MechPart",GETONLY(part),},
     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),
    322322"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"
    323323"Examples:\n"
     
    333333"for(i=0;i<iobj.properties;i++)\n"
    334334" Simulator.print(iobj.getId(i)+\" (\"+iobj.getName(i)+\")\");",},
    335 {"def",0,0,"Neuron definition from which this live neuron was built","o NeuroDef",GETONLY(neurodef),},
    336 {"classObject",0,0,"Neuron class for this neuron","o NeuroClass",GETONLY(classObject),},
     335{"def",0,PARAM_READONLY,"Neuron definition from which this live neuron was built","o NeuroDef",GETONLY(neurodef),},
     336{"classObject",0,PARAM_READONLY,"Neuron class for this neuron","o NeuroClass",GETONLY(classObject),},
    337337#ifdef NEURO_SIGNALS
    338338{"signals",0,PARAM_READONLY,"Signals","o NeuroSignals",FIELD(sigs_obj),},
  • cpp/frams/vm/classes/3dobject.cpp

    r121 r127  
    225225{"zz",1,PARAM_NOSTATIC,"orientation.z.z","f",FIELD(o.z.z),},
    226226
    227 {"x",0,PARAM_NOSTATIC,"x vector","oXYZ",GETONLY(x),},
    228 {"y",0,PARAM_NOSTATIC,"y vector","oXYZ",GETONLY(y),},
    229 {"z",0,PARAM_NOSTATIC,"z vector","oXYZ",GETONLY(z),},
     227{"x",0,PARAM_NOSTATIC+PARAM_READONLY,"x vector","oXYZ",GETONLY(x),},
     228{"y",0,PARAM_NOSTATIC+PARAM_READONLY,"y vector","oXYZ",GETONLY(y),},
     229{"z",0,PARAM_NOSTATIC+PARAM_READONLY,"z vector","oXYZ",GETONLY(z),},
    230230
    231231{"new",0,0,"create new Orient object","p oOrient()",PROCEDURE(p_new),},
  • cpp/frams/vm/classes/collectionobj.cpp

    r121 r127  
    3030{"new",0,0,"create new Vector","p oVector()",STATICPROCEDURE(p_new),},
    3131{"sort",0,PARAM_NOSTATIC,"sort elements (in place)","p(o comparator)",PROCEDURE(p_sort),"comparator can be null, giving the \"natural\" sorting order (depending on element type), otherwise it must be a function reference obtained by the \"function FUNCTIONNAME\" operator.\n\nExample:\nfunction compareLastDigit(a,b) {return (a%10)<(b%10);}\nvar v=[16,23,35,42,54,61];\nv.sort(function compareLastDigit);"},
    32 {"iterator",0,PARAM_NOSTATIC,"iterator","o",GETONLY(iterator),},
     32{"iterator",0,PARAM_NOSTATIC+PARAM_READONLY,"iterator","o",GETONLY(iterator),},
    3333{0,0,0,},
    3434};
     
    4444 "var i;\nfor(i=0;i<d.size;i++) Simulator.print(d.getKey(i)+\" is \"+d.get(i));",},
    4545{"clear",0,PARAM_NOSTATIC,"clear data","p()",PROCEDURE(p_clear),},
    46 {"size",0,PARAM_NOSTATIC,"element count","d",GETONLY(size),},
     46{"size",0,PARAM_NOSTATIC+PARAM_READONLY,"element count","d",GETONLY(size),},
    4747{"remove",0,PARAM_NOSTATIC,"remove named or indexed element","p(x key)",PROCEDURE(p_remove),},
    4848{"get",0,PARAM_NOSTATIC,"get named or indexed element","p x(x key)",PROCEDURE(p_get),},
Note: See TracChangeset for help on using the changeset viewer.